Security officials said at least four of the attackers were killed and at least three seized during the operation.
Al Jazeera's Kamal Hyder, reporting from the eastern city, said that that the accusation the Pakistani Taliban had carried out the attack came after one of the captured assailants had been interrogated.
Malik said that one of the attackers was an Afghan who had arrived in Lahore 15 days earlier.
"Some of his accomplices have been identified, while others are in the process of being identified," he said.
There has been no claim of responsibility for the attack.
Witnesses said that some of the assailants had entered the academy disguised as police officers, attacking officers as they gathered for morning training exercises.
"A grenade hit the platoon next to ours ... then there was continuous firing for about 20 minutes," one wounded police officer said.
"A man in light-coloured clothes ... stood in front of us, firing at us. They wanted to do as much damage as possible."
The attackers then occupied the academy's main building, exchanging gunfire with security forces for several hours until a joint force of army, paramilitary rangers and police stormed it.
Private Pakistani television channels aired images of troops celebrating on the rooftop of a building in the police compound after the fighting ended.
"Our forces stormed the top floor where they were holding positions," Major-General Shafqaat Ahmed, commander of the Lahore army garrison, said.
Early reports had suggested that the attack had killed up to 50 people, but as the situation became clearer following the end of the siege officials brought the toll down dramatically.
Imtiaz Gul, a Pakistani political analyst, said the attack underscored the "ill-preparedness" of police and paramilitary forces in the country.
"The kind of attack that took place is very, very difficult to pre-empt. There are people who came prepared to kill. On the other side, you see the kind of response from paramilitary forces.
"The entire country has been paying the price for this ill-preparedness," he said.
Pakistan has faced scores of attacks in recent years and, although Lahore has largely escaped the violence, it has not been immune.
Armed men ambushed Sri Lanka's cricket team in the city earlier in March, killing six police officers and a driver and wounding several of the players.
"The pattern is much the same; they are very well organised, very well co-ordinated and unfortunately very well executed as well," PJ Mir, a Pakistani political analyst, told Al Jazeera.
"The Americans have to put their foot down and provide the Pakistani forces with more up-to-date arms, more up-to-date technology to fight these elements of crimes."