The parade ground was still sodden from overnight rain but their instructors were in no mind to cancel Monday morning's drill. So, from 7am, Azhar Abbas and his fellow police cadets had been undergoing inspection, having their names checked off the roster, their uniforms scrutinised. Twenty minutes later, chaos broke out.

"One grenade was thrown by the terrorists and then they were firing their guns indiscriminately across the parade ground," recalled the shaken young man, sitting afterwards in his barracks hugging fellow cadets. "That was when someone shouted 'Save your lives'. There was a wall, and we ran to it. We tried to save ourselves."

Mr Abbas was one of around 800 recruits inside the Manawan police training centre on the outskirts of Lahore when a group of gunmen, armed with automatic weapons and bags of grenades, stormed the lightly defended compound and launched an attack that has upped the stakes once again in Pakistan's battle with the militants.

The bloodshed could have been much worse – eight police cadets are thought to have been killed and 90 injured – but the eight-hour siege at the police compound marked another disturbing development in the militants' tactics. Coming just three weeks after gunmen tried to hijack the Sri Lankan cricket team in the same city, yesterday's brazen assault has left authorities struggling to know how to protect locations that, until now, have barely been considered targets.

Precisely how many gunmen were involved remains unclear. Three or four are thought to have been killed, with at least two of them blowing themselves up as the Pakistani security forces closed in. Another militant – said to be an Afghan national – who may have been coordinating the attack from outside the compound, was captured alive. Two more possible suspects were being interrogated by the authorities.

Witnesses said that the group of men – most of them wearing traditional salwar kameez but at least one wearing a blue training academy tracksuit – had been dropped by a white van outside the academy at around 7.20am. The academy, located on the famous Grand Trunk road and just 10 miles from the Indian border, is not heavily defended (the guards on the gates apparently had just four bullets each). The gunmen simply leapt over the low perimeter wall, throwing grenades and firing their weapons.

Trainee Gozel Ansari, who started his induction just six weeks ago, was on the rear parade ground. "Suddenly there was a loud bang and we heard a series of three blasts. We asked the instructors what was happening," he said. "Suddenly the security guards appeared, saying that we were being attacked. We ran into a corner near the toilets and hid. The bullets were passing over our heads. We felt that any moment we could die."

As Mr Ansari and his colleagues huddled between two buses, the gunmen stepped over the bodies of the dead cadets sprawled on the parade ground, entered the academy and made their way upstairs. From the rooftop they continued to fire. An ambulance arrived and was swiftly targeted. When the first 12-strong group of police commandos turned up, six of their weapons jammed and they had to leave to re-arm, according to a police inspector at the scene. Reinforcements arrived some time later from paramilitary troops, complete with armoured personnel carriers and a surveillance helicopter, and a sustained gun fight began with the militants, who by now had taken up positions on the second floor.

Yesterday afternoon, the intensity of that exchange was obvious. The walls of the academy, both inside and out, were pock-marked with bullet holes while empty cartridge shells littered the parade ground, on which still lay the berets of half a dozen cadets. The worst of the fighting was concentrated in a second-floor dormitory where three gunmen were making their last stand, holding up to 10 cadets hostage. Video footage shot by local television channels showed police commandos gradually moving towards the dormitory, occasionally standing up to let off a volley of automatic fire.

Police said they were able to shoot one of the militants. But surrounded and trapped, it appears the last two militants decided to take their own lives. At around 3pm two loud blasts were heard as the gunmen set off suicide bomb belts.

Police and forensics experts were last night working their way through the dormitory looking for clues. The walls and roof of the dormitory were splattered with blood and human tissue, while more substantial remains of the gunmen, including a head and a severed arm, lay on the floor. Police also recovered weapons, spare cartridges and a suicide belt, packed with ball-bearings, that had not been detonated. The gunmen had also brought bars of chocolate and tubes of throat lozenges, but unlike the attackers in Mumbai, it appears these militants were not expecting their assault to stretch into days.

Pakistan's interior ministry chief, Rehman Malik, said he believed the gunmen were linked to Baitullah Mehsud, a leader of the Pakistan Taliban in South Waziristan. Mr Malik said all the planning was done in that area and that one of the three men being questioned was an Afghan who arrived in Lahore two weeks ago. At the same time, some of the cadets said they heard gunmen speaking with accents from the southern Punjab, raising the prospect of a nexus between militants based in Pakistan's tribal areas and those from the largest and wealthiest province. Mr Malik also suggested the gunmen may have been members of Lashkar-e-Jhangvi, a Punjab-based group said to have links to al-Qa'ida.

Police and commandos celebrated the end of the siege by firing into the air, shouting 'God is great'. Their operation had been judged a success; none of their officers killed, the hostages rescued unharmed. But with the surging militancy again flexing its muscles – this time just days after President Asif Ali Zardari promised his country would not become a haven for terrorists– Pakistan may have little reason to cheer.

Hour by hour: How siege unfolded

0720 Attackers vault wall and begin firing indiscriminately on cadets, out on the parade ground doing their morning march. Sound of gunfire, grenades and bomb blast.

0840 First contingent of police commandos arrive.

0905 Reinforcements arrive in form of paramilitary troops with armoured personnel carriers.

1400 Tear gas fired into building where militants holed up on top floor with their hostages.

1430 One of attackers is arrested.

1500 Two militants blow themselves up on roof.

1515 Siege ends and security forces dance on roof in celebration.

Source: Independent

Belfast Telegraph