Major General Sher Afghan, head of the Frontier Corps paramilitary based in Balochistan, said all three gunmen had been killed and belonged to Lashkar-e-Jhangvi al-Alami, a Sunni sectarian militant group. 

He said two of the attackers detonated suicide vests during a three-hour gun battle with soldiers sent to rescue the police cadets. 

“I was lying in bed checking my Facebook account when I heard a loud explosion followed by heavy firing. I immediately switched off the light, locked the door and ducked under the bed as per directives in case of a terrorist attack,” Asif Hussein, one of the cadets who escaped uninjured, told reporters.

Army Chief Raheel Shareef and Director General of Inter Services Intelligence (AA) – Pakistan's spy agency – attended a mass funeral in Quetta, the provincial capital where the training center was based. 

"The situation is under control now and all the adjoining roads that were closed due to the rescue operation have been opened for traffic," Balochistan Home Minister Sarfraz Bugti told reporters.

He said more than 250 cadets who were being held hostage by the militants were rescued by soldiers. 

Quetta has for decades now been the focus of sectarian violence in Balochistan that has killed thousands. This August more than 70 people, mostly lawyers, were killed in a suicide blast at a hospital in Quetta.

Anadolu Agency