Pakistan's president, Pervez Musharraf, today announced his resignation after robustly defending his record.
Expectations that the former army chief and firm US ally would go had been mounting since the coalition government, led by the party of the assassinated former prime minister Benazir Bhutto, said this month it planned to impeach him.
In a televised address to the nation, he defended his decision to impose emergency rule late last year, claiming his political opponents would have made matters worse for Pakistan.
He said Pakistan had always been his priority, and that he had imposed emergency rule in order to save the country from crisis.
Musharraf said his policies had improved the economy and women's rights, and laid the ground for democracy.
"People have said my policies over the past nine years have been wrong - they were wrong," said Musharraf. "My critics must not make things worse for Pakistan.
"Some elements acting for vested interests have made false allegations against me. Everything I have done will have long-term benefits for Pakistan."
Musharraf, who seized power in a 1999 coup but has been largely sidelined since his rivals won parliamentary elections in February, had for months resisted calls on him to resign.