Pakistani President Pervez Musharraf on Monday announced his resignation in a televised speech to the nation.
"I decided to resign today, and I will send my resignation to the speaker of parliament house," Musharraf said.
"I have consulted all legal experts and my political supporters. With their advice. I have decided to quit," he said.
Musharraf took power in 1999 in a military coup.
Musharraf rejected allegations against him by the ruling coalition and said they are misleading the nation.
"Unfortunately some elements prefer personal interests to national interests. They leveled baseless allegations against me. They deceived the people," he said.
"They never thought that although they would succeed against me but they did not realize they will cause damage to the country," Musharraf said.
The president said no charges could stand against him, and he had the right to defend himself in the face of impeachment. But he said that politics of confrontation must come to an end and instead a policy of reconciliation be pursued.
"For me, it is always Pakistan first," he said.
Pakistan's ruling coalition parties on Aug. 7 announced that they would launch an impeachment against the president. The speculation about Musharraf's resignation has mounted since then.
Musharraf did not talk about his "safe exit" after his resignation in his speech. But reports earlier said Musharraf and the ruling coalition have held talks about whether he would stay in Pakistan or fly into exile abroad if he resigns.
(Xinhua News Agency August 18, 2008)