QUETTA, Pakistan — A bombing killed four members of Pakistan's paramilitary force on Wednesday on the outskirts of the southwestern city of Quetta while elsewhere in the city, gunmen opened fire on a senior police officer's convoy, killing two of his guards, police said Wednesday.

The Pakistani Taliban claimed responsibility for both attacks.

The bombing, which also wounded seven troops, took place on Wednesday evening in a training area of the paramilitary force's camp in the Nosar area near the city, said police official Babu Nazir.

Nazir said the victims were taken to Quetta's main hospital while explosives experts were investigating the bombing.

An explosives expert said the attack was apparently a suicide bombing but did not provide more details. He spoke on condition of anonymity because he was not authorized to talk to the media.

Earlier in the day, gunmen opened fire from a speeding car, killing two guards of a senior police officer who escaped unhurt.

Abdur Razzaq Cheema, a police chief in Quetta, said the target of the attack was Hameedullah Dasti. He was en route to a prison to take militants who are on trial to court. Dasti was traveling in a bullet-proof vehicle, but his guards were not.

The Pakistani Taliban — the Tehrik-e-Taliban Pakistan, or TTP — claimed responsibility for both attacks.

The group's spokesman Mohammad Khurasani said in a message that such drive-by attacks would continue, in revenge for the Pakistani forces' killing of their followers and death sentences handed down to convicted militants.

TTP said the attack on the paramilitary camp was a "suicide attack on a high security base."

Quetta is the capital of Baluchistan province, the scene of a low-level insurgency by Baluch separatist groups that demand a greater share of the province's resources. Militant groups also operate there and often target security forces.

Last month, militants opened fire on a paramilitary convoy in Baluchistan, killing at least six troops and wounding four others. A week before that, a suicide bomber targeting a police truck in Pakistan killed six people and wounded 17. The TTP claimed responsibility for both attacks.