At least 48 cadets and guards have been killed after militants attacked a police college in the Pakistani city of Quetta, officials say.
A major security operation lasted for hours after the attackers entered the building and opened fire.
Officials say three militants wearing suicide bomb vests stormed the college – all three were killed.
Hundreds of trainees were evacuated from Balochistan Police College as troops arrived to repel the militants.
Pakistan’s army and the paramilitary Frontier Corps took part in the military counter-operation, which Balochistan provincial home minister Mir Sarfaraz Ahmed Bugti said was now over.
“I saw three men in camouflage whose faces were hidden carrying Kalashnikovs,” one cadet said according to AFP news agency. “They started firing and entered the dormitory but I managed to escape over a wall.” The police academy is home to about 600 students.
Two of the militants died after detonating their bomb vests and one was killed by security forces, he said.
Many of the cadets were killed by the blasts, said Major General Sher Afgan of the Frontier Corps.
Medics take an injured police cadet to Quetta hospital. Photo: 24 October 2016
No group has so far said it was behind the attack, which happened late on Monday. At least three explosions were reported at the scene by local media.
There was intermittent exchange of fire between the attackers and security forces for several hours, according to Dawn newspaper. There were also reports of a hostage situation.
More than 100 people, mostly trainees, were injured.
Earlier in the day, two customs officers were shot dead and another critically wounded in Surab, south of Quetta.
Quetta is the provincial capital of Balochistan, where separatist groups and Islamist militants have both carried out similar attacks in the past.
In August, 88 people were killed in separate bomb attacks targeting a hospital and lawyers in Quetta.
The Pakistani military has been conducting military operations against militants in volatile tribal areas near the Afghan border.