Pakistani security forces fire into the air from the roof of a police academy near Lahore to celebrate the end of a siege that lasted several hours.
Gunmen stormed the police training school during a morning drill. At least 14 people have died and nearly 100 have been injured.
Security forces rushed to assist at the scene, with an officer inside the compound describing "complete panic".
As troops tried to force their way into the main building, the gunmen retaliated by throwing grenades.
After the siege ended, investigators entered the building to begin the task of collecting evidence.
Weapons have been removed from one of the rooms the attackers are believed to have used.
Meanwhile, security forces arrested a man suspected of being one of the insurgents.
The latest militant attack comes nearly a month after gunmen attacked the visiting Sri Lankan cricket team in Lahore. There have been no high-profile arrests.