Pakistan's erstwhile strongman Pervez Musharraf resigned as president Monday, succumbing to pressure from the new ruling coalition to quit or face impeachment by parliament.
Born in Delhi on August 11, 1943 to educated parents, Musharraf came to Pakistan with his family after the partition of the Indian subcontinent in 1947.
He spent seven years of his early childhood in Turkey because of his father's diplomatic assignment and on his return in 1956 joined an exclusive college in the eastern city of Lahore. He later went on to the Pakistan Military Academy and was commissioned in an elite artillery regiment in 1964.
Musharraf saw action in two wars with archrival India in 1965 and 1971. He also served two tours in the special forces. Although his military career was tainted by disciplinary violations, he was appointed military chief in 1998 by then-prime minister Nawaz Sharif.
He seized power on October 12, 1999 when the army revolted against Sharif, who tried to remove the general for disagreements over the withdrawal of Pakistani troops from Kargil heights in India-administered Kashmir.
Starting off with pledges to steer the nascent Muslim nuclear power through the state of turmoil amid widespread corruption, Musharraf said he wanted to end what he called the "sham democracy" plaguing the country and its institutions.
Weeks after declaring himself president in June 2001, he had to part ways with the Taliban in neighbouring Afghanistan following the unprecedented terrorist attacks in the United States.
The U-turn gained him the status of a frontline US ally but exposed him to al-Qaeda and Taliban-linked hardliners who felt betrayed after years of unflinching support.
Musharraf held a flawed general election in October 2002, bringing in a loyal parliament that allowed him to remain president on his assurances that he would leave his military post by the end of 2004.
In the meantime, he survived at least three assassination plots, two of them in 2003 in the garrison town of Rawalpindi, home to the military headquarters.
Pakistan witnessed an economic boom accompanied by infrastructure development and the emancipation of women, who achieved more representation in the legislature and other decision-making agencies.
Musharraf also made his strongest stand against Muslim extremists with the bloody July 2007 military raid on Islamabad's radical Red Mosque, to take out battle-hardened pro-Taliban fighters. The government acknowledged that more than 100 people died in the siege, including many students, while critics claimed the death toll was several times higher.
The president's popularity suffered sharply, and his downfall was presaged when he was forced to relinquish the country's most powerful office, that of the army chief.
A promise fulfilled belatedly, Musharraf passed the baton to the quiet but diligent head of Pakistan's powerful Inter Services Intelligence agency, General Ashfaq Parvez Kayani, on November 28 and become a civilian president with 46 years of military background.
Musharraf won a controversial October 2007 re-election, but faced an increasingly independent judicial branch.
The Supreme Court headed by Chief Justice Iftikhar Chaudhry, who was suspended by Musharraf in March last year but reinstated by a special panel four months later, agreed to rule on a suit alleging the election to be illegal.
It was widely believed the judiciary was about to decide against Musharraf when he proclaimed a state of emergency on November 3, suspending the constitution and sacking more than 60 judges including Chaudhry.
The desperate extra-constitutional move triggered a tidal wave of protests by politicians, lawyers and rights activists.
A mighty blow came when former premier Bhenazir Bhutto was assassinated in at a public rally on December 27 in Rawalpindi.
Her party cast suspicion on Musharraf although the government claimed the attack was orchestrated by pro-Taliban militants entrenched in the country's north-western tribal region near Afghanistan.
Amid a sympathy wave for Bhutto's party and public support for returning former premier Nawaz Sharif, Musharraf lost his political backing in the February 18 parliamentary elections.
Asif Ali Zardari, Bhutto's widower and her successor as party chief, and Sharif formed a coalition government with two smaller parties. Both leaders announced on August 7 announced that they would impeach Musharraf on charges of gross misconduct and violating the constitution.
The threat was followed by hectic negotiations between the coalition partners and the retired general's aides, ending with Musharraf announcing his resignation on Monday.