By Syed Shoaib Hasan
BBC News, Islamabad
Female students were angered by the laying of barbed wire
Fighting between Pakistani security forces and students at a radical mosque in the capital appears to have been sparked by a territorial dispute.
During the past week, guard duties around the Red Mosque had been taken over by Paramilitary Rangers.
"They were laying down barbed wire within 100 yards of the mosque," a spokesman for the Red Mosque told the BBC.
"We had an agreement with them there would be no fencing within 100 yards."
Trouble started when female students at a religious school attached to the mosque began removing the barbed wire, and seized a number of paramilitary weapons. Male students also joined in.
"At that point they shelled us with tear gas, and then started firing at us," the mosque spokesman said.
"We had no choice but to retaliate."
This started off a round of skirmishes and gun battles between the students and the security forces, who had taken up positions in nearby government offices.
The students used stones and Molotov cocktails to smash window panes and firebomb the buildings.
The security forces retaliated by firing live rounds at the rioters and liberally using tear gas.
Witnesses say two people were killed on the spot. Several people were injured, some of whom died in hospital.
The BBC arrived at the scene at 1400, just after the initial clash had taken place.
Ambulances with sirens blaring zoomed to the mosque gates, as the injured were taken for medical attention.
The mood outside the mosque was one of anger and violence.
"Musharraf is an American dog, and we will kill him," chanted the crowd. "The Rangers are unbelievers... we will destroy them."
The BBC saw two government buildings being stoned and set alight.
The students were joined by what appeared to be other young men from the area - dressed in jeans and shirts in stark contrast to the traditional outfits of the militant students.
A few men who said they were local traders also joined the mob.
They said that the government had committed a great crime by attacking people "fighting for the cause of Islam".
Meanwhile, ambulances leaving the scene of the clashes with the injured were stopped at an outside perimeter by the police.
The injured were allowed to proceed, but mosque students accompanying them were taken into custody.
In one such incident, a student managed to wriggle free and sped off towards the safety of the mosque.
Two police men with automatic rifles were in furious pursuit.
As their quarry appeared to be getting away, one stopped, took aim and fired at his target who was less than 10 yards away and directly in front.
Miraculously, he missed and the fleeing student was able to make good his escape.
At that point there was a short lull in the firing as the paramilitary forces were later replaced by special forces.
Journalists were in the thick of it - one was killed
Subsequently the most intense period of gunfire took place.
All ambulances and media personnel were asked to leave the area.
An armoured personnel carrier was sent up on a reconnaissance mission, to be met by a hail of fire.
The students also set fire to cars in the parking compound of the nearby Ministry of Environment.
Around this time, a cameraman with a local television channel was shot dead.
An eyewitness told the BBC he was hit in the head by a bullet from the security forces.
This was followed by a series of loud explosions which rocked the surrounding area.
Subsequently, the mosque administration claimed by loudspeakers that a student had carried out a suicide attack.
But witnesses said the blasts were caused by exploding petrol tanks in cars on fire.
Following the explosions, the fighting died down for a while and a ceasefire was apparently brokered.
But shots soon rang out again, with the Lal Masjid loudspeakers proclaiming: "We will avenge those who have been martyred."