Beleaguered President Pervez Musharraf announced his resignation on Monday in the face of an impending impeachment motion by Pakistan's ruling coalition government.
The former army chief and firm U.S. ally had seen his popularity slide over the past 18 months and had been isolated since his parliamentary allies lost a February general election.
Here is a chronology of recent events that led to the downfall of Musharraf, who seized power in a bloodless coup in December 1999 and became president in 2001.
March 9, 2007 - Musharraf suspends Supreme Court Justice Iftikhar Chaudhry over allegations of misconduct. Lawyers rally around the top judge and Musharraf's popularity plummets.
July 10 - Musharraf orders troops to storm the Red Mosque in Islamabad to crush a Taliban-style movement there. At least 105 people are killed. Militant attacks and suicide bombings follow.
July 20 - Supreme Court reinstates Chief Justice Chaudhry, dealing a blow to Musharraf's authority.
July 27 - Musharraf meets former prime minister Benazir Bhutto in Abu Dhabi for inconclusive talks on how to move the country towards a civilian-led democracy. Bhutto demands Musharraf step down as army chief.
Sept 10 - Former prime minister Nawaz Sharif is arrested at Islamabad airport on his arrival from exile, despite the Supreme Court clearing his return. He is deported to Saudi Arabia.
Oct 2 - Musharraf's government announces it will drop graft charges against Bhutto, clearing the way for her return.
Oct 6 - Musharraf wins a presidential vote by legislators. Supreme Court holds off confirming legality of vote.
Oct 19 - Suicide bomber tries to assassinate Bhutto in Karachi as she returns from eight years of exile.
Nov 2 - Supreme Court meets to decide if Musharraf was eligible to stand for re-election while still army chief.
Nov 3 - Musharraf imposes emergency rule, detaining thousands of opposition politicians and lawyers.
Nov 11 - Musharraf says parliamentary elections will be held by January 8.
Nov 13 - Bhutto is placed under house arrest for a week in Lahore, hours before planned march against emergency rule. Bhutto says Musharraf must quit as president.
Nov 15 - Musharraf appoints Senate chairman Mohammadmian Soomro to head a caretaker line-up to oversee elections.
Nov 22 - Commonwealth suspends Pakistan.
Nov 25 - Sharif returns from exile.
Nov 28 - Tearful Musharraf hands command of the army to General Ashfaq Kayani.
Nov 29 - Musharraf is sworn in as civilian leader.
Dec 15 - Musharraf lifts state of emergency, restores constitution.
Dec 27 - Bhutto is assassinated in a gun and bomb attack.
Jan 2 - Election delayed from Jan 8 to Feb 18 because of disturbances after Bhutto's assassination.
Feb 18 - Resounding election victory for parties led by Bhutto's widower Asif Ali Zardari (Pakistan People's Party) and Sharif (Pakistan Muslim League (Nawaz)). Analysts say Musharraf may be driven out.
March 9 - Sharif says he will join Zardari to form a coalition hostile to Musharraf.
Aug 7 - Ruling coalition says it will launch proceedings to impeach Musharraf.
Aug 16 - Pakistan's ruling coalition prepares impeachment charges against Musharraf focusing on violation of the constitution and misconduct.
Aug 18 - Musharraf announces resignation.
(Writing by David Cutler and Gillian Murdoch; additional writing by Jijo Jacob; editing by Roger Crabb; Editorial Reference Units)