Pakistan's President Pervez Musharraf, who was facing impeachment by his political rivals, has announced he is to resign after nine years in power.
The former army chief and firm US ally has seen his popularity fall over the past 18 months and has been isolated since his allies lost a February election.
"My resignation will go to the speaker of the National Assembly today," he said during the televised address.
During the hour-long address, Mr Musharraf - who seized power in a 1999 coup but has been isolated since his allies lost a February election - said that the office of the president would be damaged by the impeachment process.
"Pakistan is my love," he said. "Even if impeachement is defeated, in my view, relations will never be right. There will always be tension. There will be tension in the institutions of the country."
After consultation with his legal advisors, Mr Musharraf said he would resign from his office.
"I deny the charges that economic crisis is caused by policies of my government in the past nine years," the 65-year-old former army chief said.
Mr Musharraf's speech came as the coalition government prepared impeachment charges against him.
Mr Musharraf rejected claims that he was seeking immunity from prosecution. "I don't want anything from anybody. I have no interest. I leave my future in the hands of the nation and people," he said.
The country's coalition partners will meet today to discuss the latest developments.
Former prime minister Nawaz Sharif and other coalition leaders are meeting Asif Ali Zardari, co-chairman of the Pakistan Peoples Party (PPP), are expected to discuss the reinstatement of judges sacked by Mr Musharraf.
Coalition officials have been hoping Mr Musharraf would resign to avoid impeachment while some allies have said he should at least answer charges brought against him before stepping down.
Mr Sharif's Pakistan Muslim League is the second-biggest partner in the ruling alliance. Pakistan's four provincial assemblies passed resolutions last week asking the president to seek a confidence vote in parliament or face impeachment proceedings.
Additional reporting: Bloomberg, Reuters