Why did this Pakistani police operation fail?
The protesters had been blocking a main road in the Pakistani capital, Islamabad, for three weeks, demanding the law minister be sacked for blasphemy.
Then, last Saturday, the police moved in to break up the demonstration, spurred by public anger at the continued closure of the Faizabad Interchange.
The operation appeared to be going well. So how then did it become so incredibly botched?
Was it simply intelligence failure or incompetence by the police? Or was it orchestrated by an intelligence service that has often been blamed for using Islamist proxies to influence decisions by the civilian authorities?
Police and other sources agree that the failure of the operation was largely due to a sudden surge in the number of protesters, who then launched a fierce counterattack on the police.
But who were the reinforcements and where did they come from?
- Why was this Pakistan general giving money to protesters?
- Islamists call off protest
- Pakistan protests: The political tensions behind the scenes
The police operation had begun last Saturday morning. More than 5,000 personnel had been deployed to quell protesters who, according to the intelligence branch of the police, numbered between 1,700 and 1,800.
After the first couple of hours, it was reported that the police operation was succeeding.
"We saw Faizabad bridge being cleared of protesters, and [Superintendent of Police] Amir Niazi reached the stage where he switched off the public address system the protest leaders had set up to communicate with their followers," one reporter at the scene told the BBC.
"The protest leaders were announcing requests to the police to be good Muslims and not to fire any more tear-gas shells at them. They were sensing defeat."
Then things changed. Hundreds of stick-wielding men appeared from the streets of Sohan village, just east of the police operation and fell upon the officers.
Noorul Amin, a Samaa TV reporter who was stationed on the Sohan side of the bridge, saw events unfold there.
"I saw some 800 to 1,000 men suddenly emerge from behind us and hit the police swiftly," he said in a private video that went viral on social media.
"They were wielding sticks [and some had] tear-gas guns."
A Sohan resident told the BBC: "There was nothing unusual about their physical appearance, except that they came in shockingly large numbers and appeared to be more skilled than the ordinary protesters.
"They were carrying sticks and buckets of water which they used to douse tear-gas shells fired by the police. They knocked down a couple of policemen right over there and snatched their riot gear."
A senior police official told BBC Urdu reporter Shahzad Malik that he saw "hundreds of policemen deployed on the main highway start to run up the Y-junction branching out westwards from the highway towards the bridge".
The official said: "For a moment we thought the force was moving in to storm the stage and arrest the protest leaders, but then we saw they were being chased by hundreds of furious protesters.
"These protesters were well-trained, and they fired tear-gas shells that were different from ours in that they emitted smoke at both ends. Soon they were back in control of the bridge. The public address system which had been relaying requests to the police to take mercy on protesters now started to announce calls for the protesters to attack the police."
The police failure was an embarrassment for the government, which had to call in the army.
But the army seems to have acted as a mediator instead of being the arm of the civilian authority, brokering a deal that saw the government accept all the demands of the protesters, including a general amnesty for them and the sacking of Law Minister Zahid Hamid.
In a report submitted at the Supreme Court on Thursday, the police offered various reasons why the operation failed.
They included fatigue among the police due to the prolonged protest, the fact that religious sentiments were constantly invoked by protest leaders in their speeches, as well as the last-minute emergence of "additional [Tehreek-i-Labaik Ya Rasool Allah Pakistan] activists from the adjoining areas of Rawalpindi" who launched "brutal attacks on the police force".
But this hardly explains why a joint force of 5,500 policemen, Frontier Constabulary and paramilitary Punjab Rangers would cave in before a crowd half its size.
Two police officers interviewed by BBC Urdu pointed to a lack of co-ordination among the forces.
One said the Rangers were stationed at the back as the second line of defence, and did not move when their support was needed.
"They did not take part in any action, and when the police were uprooted, they abandoned their positions and disappeared," he said.
Director-general of the Punjab Rangers, Maj-Gen Azhar Navid Hayat, is seen handing out envelopes containing 1,000-rupee ($9.50; £7) notes to protesters who were described as having no money to pay their bus fare home.
"This is a gift from us to you," the general is heard telling one bearded man. "Aren't we with you too?"
He then goes on to pat another protester on the cheek and offers a reassurance that, "God willing, we'll get all of them released" - presumably a reference to arrested protesters.
With so many factors to consider, the larger picture is unlikely ever to emerge, as has always been the case within Pakistan's murky political intrigues.
What is clear is that the protests came in the wake of yet another political crisis which has paralysed the country, and in which the military and the political establishment appear to be struggling to get an upper hand.