Days of high political drama in Pakistan ended with a whimper on Thursday when top officials successfully brokered a face-saving deal with an Islamic cleric who staged a four-day sit-in with thousands of his followers in the heart of the country's capital.
Despite concerns that the protest could derail historic forthcoming elections, or even presage a military coup, the bizarre spectacle ended with a deal that granted few of the demands originally made by Tahir-ul-Qadri, a self-styled anti-corruption campaigner who swept into the capital on Monday demanding a revolution.
In surreal scenes played out on television screens throughout the day, some of Pakistan's most influential politicians sat locked in discussions with Qadri in the bomb-proof metal box in the middle of Islamabad's main thoroughfare that he has occupied since Monday.
Television cameras pointed at the bulletproof glass window at which Qadri had given long and combative speeches all week, showing clear images of their deliberations.
But Qadri's demands for the dissolution of parliament, the resignation of the government and the re-constitution of the election commission were either ignored or artfully fudged in a signed agreement between the two sides that ruled out any major changes to the way Pakistanis will elect their next government this summer.
Nor was there any mention of Qadri's demand that the army and judiciary two institutions he has showered with praise should play a role in selecting the caretaker administration that will run the country for up to three months after the government reaches the end of its five-year term.
Instead, an Islamabad Long March Declaration signed by the two sides promised Qadri's political party a consultative role in choosing a caretaker prime minister.
Qadri, a Canadian citizen who erupted on to the political scene last month with a dramatic return to the country of his birth, had to make do with a restatement of commitments already incorporated in the constitution, including the scrutiny of all parliamentary candidates.
A persistent theme of Qadri's lengthy speeches was his attacks on politicians he described as looters and tax avoiders.
Cyril Almeida, a newspaper commentator, said it had become clear that Qadri's effort was doomed when all the country's political parties said they were not prepared to support anything other than elections taking place on time and in accordance with the constitution.
"Once the political class closed ranks, and direct, overt support to Qadri from the army or judiciary was not forthcoming, Qadri had to find a face-saving exit," he said.
"The government has given him that, he'll go home, or to Canada, and the country can get on with elections as scheduled."
Qadri was also coming under pressure from a crowd of supporters which, always far smaller than the "million man march" he had claimed, has been camped out on the streets of Islamabad since Monday.
Thursday was particularly miserable for his supporters as rain poured down during Qadri's address.
But the most striking sign of the climbdown came when the text of the declaration was sent off to be signed by Raja Pervaiz Ashraf for his signature.
On Tuesday the crowds had gone into raptures when news broke that the supreme court had ordered the head of the National Accountability Bureau (NAB), an anti-corruption agency, to arrest Ashraf on charges relating to a graft scandal during his time as minister in charge of electricity supplies.
That announcement more than anything else convinced Qadri's supporters, and most observers, that there was an establishment conspiracy afoot to bring down the government and scupper hopes that Pakistan, for the first time in its history, would see the transfer of power between two democratically elected governments.
But two days later the prime minister remained at liberty (the NAB told the court it lacked sufficient evidence to arrest Ashraf) and was shown beaming on television as he cheerfully signed the declaration.