The dictator has gone. Now the battle for his spoils begins.
As Pervez Musharraf stood down yesterday after eight-and-a-half years as Pakistan's leader, the country was facing yet more uncertainty. His political opponents had last night not announced whether they would grant him immunity and it was unclear whether the man who towered over Pakistan's political landscape would be allowed to remain in the country. Now there are questions as to how long the coalition government, headed by two men hugely ambitious for power, will hold together.
In an emotional hour-long televised address to the nation, the former military commander who grabbed power in a 1999 coup defended his record. "I hope the nation and the people will forgive my mistakes," he said. Rejecting charges of economic mismanagement, he said it was better for Pakistan if it were spared impeachment. "Whether I win or lose, the nation will lose. The honour and dignity of the country will be affected and the honour of the office of President will also be affected."
He added: "I don't want anything from anybody ... I leave my future in the hands of the nation and people."
The news that Mr Musharraf had fallen on his sword prompted celebrations among his opponents. Sherry Rehman, information minister of the Pakistan People's Party (PPP), said the resignation was a victory for democratic forces: "Today, the shadow of dictatorship that has prevailed for long over this country, that chapter has been closed."
His resignation is unlikely to end Pakistan's turmoil. In the immediate term, the position of President will be filled by Mohammedmian Soomro, chairman of the upper house of parliament. In the coming days, the two parties of the coalition will put forward names for a new President. But the real struggle will be in the months ahead as former prime minister Nawaz Sharif, ousted by Mr Musharraf in 1999, and Asif Ali Zardari, widower of Benazir Bhutto, fight to assume the President's powers.
Mr Musharraf, seen by the US as a vital ally in its war on terror, is unlikely to have announced his resignation without being sure he would receive immunity against prosecution and an "exit package". However, by last night, the Government had not announced whether immunity would be granted. Mr Sharif has spoken out against it.
Mr Musharraf will certainly battle to stay in Pakistan. Turkey, Saudi Arabia the UK and the US have been suggested as possible boltholes but, in recent days, his allies had made clear he wished to retire to his Islamabad farmhouse.
Yesterday's long-anticipated announcement was somewhat anti-climactic. His enemies and opponents organised flag-waving rallies and celebratory gunfire rattled the capital but popular reaction was muted. In many ways, he had retreated from the political landscape since February's elections.
"I am happy he has gone because he is a dictator," said Raja Zaheer, an office worker eating at the Liaquat Bagh park where Ms Bhutto was killed. "Military rulers have controlled the country for too long." Musharraf's support had been in freefall since the spring of 2007 when he ousted the Chief Justice, Iftikhar Chaudhry. "That was the turning point," said Dr Rasul Bakhsh Rais, a political analyst at Lahore's University of Management Sciences. "His arrogant style alarmed many thinking Pakistanis. They thought he was not an appropriate person to be head of state."
The question now is what Mr Musharraf's departure means for Pakistan. The US had long expressed its view that the former military commander was crucial to the war on terror. Yesterday, the US Secretary of State, Condoleezza Rice, said Mr Musharraf was a "friend to the United States and one of the world's most committed partners in the war against terrorism and extremism". Even now, Pakistani troops are engaged in a massive operation against armed militants in the tribal areas along the country's border with Afghanistan.
Mr Musharraf yesterday finished his speech by declaring "long live Pakistan" and raising his hand in salute. As he left the Presidential Palace his send-off included a brass band and a red carpet. Pakistan's turmoil is set to continue but Pervez Musharraf's role in it is over.
How Pakistan's leaders met untimely ends
*Some said it was graceful, others said he went with a gun to his head. But the manner of his leaving was all but unprecedented.
In Pakistan, where every military leader's departure has come against their will and where every civilian leader has failed to complete their full term, Mr Musharraf can claim that he at least partly decided when to go.
Some were quick to point out that Mr Musharraf's resignation came almost 20 years to the day after the death of General Muhammad Zia ul-Haq, the country's longest-serving dictator, who toppled and then hanged Zulfikar Ali Bhutto, right, the country's first democratically-elected leader. The general's 11-year rule ended when he was killed in a plane crash. Most experts believe the crash was due to mechanical failure, but many in Pakistan blame a bomb.
Liaquat Ali Khan, the PM after independence in 1947, was shot dead in October 1951 while addressing a public meeting in Rawalpindi. The crowd lynched his killer. Protests triggered the demise of Pakistan's first military leader, Field Marshal Muhammad Ayub Khan, in 1969.
The opposition leader and ex-prime minister Nawaz Sharif, who was behind the impeachment effort against Mr Musharraf, was forced out in the latter's 1999 coup. Benazir Bhutto's two terms came to an end amid corruption allegations. She was assassinated last December.