Pakistan's government today blamed Taliban elements for a bloody raid on a police training centre in Lahore in which gunmen killed 11 officers and cadets, seized hostages and held out against security forces for eight hours before being overpowered.

In the second brazen terrorist attack in the city this month, the assailants stormed the Manawan police centre soon after dawn. Gun battles between the attackers and police and army officers surrounding the compound raged throughout the day, and there was a series of loud explosions.

The head of the interior ministry, Rehman Malik, said the militants were Pakistani Taliban elements loyal to Baitullah Mehsud, a commander who claims to have trained a succession of suicide bombers, and was accused of involvement in the December 2007 assassination of Benazir Bhutto.

Other experts speculated that a Punjabi group may have been responsible, though the lines between the various outfits trying to undermine the Pakistani state are increasingly becoming blurred.

The siege reached a climax at about 3.30pm (11.30am BST), when security forces were seen emerging on to the roof of a building where the gunmen had been holed up.

They began firing into the air in apparent jubilation at the end of the situation.

Officials said as many as eight had been killed and six captured; Malik said one of the suspects was an Afghan. He added that 52 officers had been wounded in the attack but gave no word on the number killed, while Geo News television channel said the toll was 20.

The incident was the second major terrorist attack in the Pakistani city within a month after the attack on the Sri Lankan cricket team.

On the roof of the building where hostages were kept, journalists were shown body parts, blood and spent ammunition strewn about.

Three loud explosions were heard from within the compound shortly after 1.30pm. Police speculated that at least some of the gunmen may have blown themselves up to avoid being arrested.

Other gunmen continued firing as troops and police prepared to mount an operation to retake the buildings, a reporter at the scene said.

Earlier, one suspect was seen being led away from the compound by a group of officers.

The gunmen opened fire on helicopters that were monitoring the situation, forcing one down.

One wounded policeman described how the attackers struck while police recruits were going through their regular morning drill on the parade ground.

"A grenade hit the platoon next to ours … then there was continuous firing for about 20 minutes," the policeman told reporters from his hospital bed.

"A man in light-coloured clothes – I think they were white – stood in front of us, firing at us. They wanted to do as much damage as possible."

The British foreign secretary, David Miliband, today condemned the attacks in a statement released by the Foreign Office in London: "It is deeply saddening that Pakistan has today suffered another deadly attack, this time against people dedicated to protecting Pakistan's security.

"We condemn the attack unreservedly, and extend our sympathies to the families of the victims.

"The attack is yet another reminder of the threat that Pakistan faces from violent extremism. It is a threat that the international community must help Pakistan to tackle, in the interests both of Pakistan's people and of wider stability."

"We are at a state of war," Afzal Ali, the former head of Pakistan's police academy, said: "This was a relatively soft target. You can't expect recruits to take on hardened terrorists."