Pervez Musharraf announced today that he was resigning as a President of Pakistan to avoid an impeachment battle that would harm the nation’s interests.
Mr Musharraf made the announcement during a lengthy and at times emotional televised address in which he said that he was leaving office knowing that whatever he has done "was for the people and for the country".
"After consultations with legal advisers and close political supporters and on their advice, I’m taking the decision of resigning,"
the former general said.
"My resignation will go to the speaker of the National Assembly today."
Until he confirmed his resignation towards the end, however, much of his defiant speech was spent denying that any of the impeachment charges against him could stand and angrily defending his time in power.
"Not a single charge in the impeachment can stand against me,"
he said.
"No charge can be proved against me because I never did anything for myself, it was all for Pakistan."
Mr Musharraf dominated Pakistan for years after seizing power in a 1999 military coup, making the country a key strategic ally of the United States by supporting the war on terror.
But his popularity at home sank over the years. Many Pakistanis blame rising violence in their country on his alliance with the United States, and his reputation suffered further last year 2007 when he ousted dozens of judges and imposed emergency rule.
He has been increasingly isolated since a parliamentary election last February elected a coalition government opposed to him.
The government, led by the party of assassinated former Prime Minister Benazir Bhutto, said earlier this month that it planned to impeach Mr Musharraf for violating the constitution and other alleged crimes, in what was seen as a clear attempt to force him from office.
Officials from Saudi Arabia, as well as the United States and Britain, have been involved in negotiations aimed at ending the damaging confrontation between President and Goverment.