Pakistani troops were conducting an anti-terror operation after gunmen stormed a police training center in the tumultuous southwestern province of Baluchistan Monday, leaving at least 41people dead.

Baluchistan’s top health official, Noor Haq Baloch, said at least 106 people were wounded mostly police trainees and some paramilitary troops.

Major General Sher Afgan, chief of the paramilitary Frontier Corps, told reporters that the attackers appeared to be in contact with handlers in Afghanistan. He said the attacker belonged to the banned Lashker-e-Jhangvi group, an Islamic militant group affiliated with Al Qaeda.

Haq said many of the trainees were killed when the gunmen detonated explosive vests.

Baluchistan Home Minister Sarfaraz Bugti said one of the attackers was killed by security forces and two detonated their explosive vests. He said security forces have completed their operation but were still engaged in the cleanup process.

Bugti said at the time of attack about 700 trainees were at the base. He said more than 200 trainees were rescued immediately after the attack.

In Monday night’s attack, between four and six gunmen opened fire as they attacked thehostel at the police training center in a suburban area of the provincial capital of Quetta.

“They were rushing toward our building firing shots so we rushed for safety toward the roof and jumped down in the back to save our lives,” one of the police trainees told Geo television.

Baluchistan police chief Ahsan Mahboob told reporters that four gunmen attacked the training center, attempting to enter the hostel housing the trainees. A gun battle erupted when the guards resisted, he said.

Mahboob said police and paramilitary forces surrounded the hostel. A statement issued by the military put the number of attackers at up to six.

The attack on the training center came hours after another attack killed two customs officers and wounded a third, authorities said.

No one immediately claimed responsibility for either attack.

Baluchistan is the scene of an ongoing low-intensity insurgency by Baloch separatist groups, who have claimed such hit-and-run attacks on security forces and government officials in the recent past.

Islamic militants also have a presence in the province bordering Afghanistan.

Footage shot by local television showed ambulances rushing out of the main entrance of the training center as fire engines sped in to put out fires set off when the gunmen threw incendiary devices.

Most of those being treated at city hospitals had gunshot wounds, although some sustained injuries jumping off the roof of the hostel and climbing a wall to escape the gunmen. Nearly all of the wounded were police; two were paramilitary troops, authorities said.

“The United States condemns the terrorist attack on the police training center in Quetta,” said State Department spokesman John Kirby in a statement. “We extend our condolences to the victims and their families, including the police cadets who are embarking on careers of public service. We stand with the people of Pakistan and Government of Pakistan at this difficult hour, and we will continue to work with our partners in Pakistan and across the region to combat the threat of terrorism.”

Earlier Monday, two gunmen on a motorcycle killed a police intelligence officer in the country’s northwestern Khyber Pakhtunkhwa province, said Khalid Khan, a local police officer.

Khan said the attackers fled the scene after killing the officer, who had been on his way to work in the provincial capital of Peshawar.

The Pakistani Taliban claimed responsibility for that attack. The group’s spokesman, Muhammad Khurasani, said in a statement that the shooters returned to their hideout after the attack.

Pakistan has carried out military operations against militants in tribal areas near Afghanistan and in cities across Pakistan, but extremists are still capable of staging regular attacks.

The Associated Press contributed to this report.