Zimbabwe’s President Robert Mugabe has resigned, parliament speaker Jacob Mudenda has said.
A letter from Mr Mugabe said the decision was voluntary and that he had made it to allow a smooth transfer of power, the Reuters news agency reports.
The surprise announcement halted an impeachment hearing that had begun against him on Tuesday afternoon.
Lawmakers roared in jubilation and people have begun celebrating in the streets.
Mr Mugabe had previously refused to resign despite last week’s military takeover and days of protests.
He has been in power since independence in 1980. Mr Mugabe has won elections, but over the past 15 years these have been marred by violence against political opponents.
He has presided over a deepening economic crisis in Zimbabwe, where people are on average 15% poorer now than they were in 1980.
Mugabe was ousted from power following the dismissal of Emmerson Mnangagwa as vice-president two weeks ago.
That decision was seen by many as clearing the way for Mr Mugabe’s wife, Grace, to succeed her husband as leader.
It riled the military leadership, who stepped in and put Mr Mugabe under house arrest.