Zimbabwe's President Robert Mugabe has resigned, parliament speaker Jacob Mudenda has said. A letter from Mr Mugabe said that the decision was voluntary and that he had made it to allow a smooth transition of power.
The surprise announcement halted an impeachment hearing that had begun against him.
Lawmakers roared in jubilation and people have begun celebrating in the streets.
Mr Mugabe, 93, was until now the world's oldest leader. He had previously refused to resign despite last week's military takeover and days of protests.
Zimbabwe's President Robert Mugabe has resigned
The letter did not mention who would take over from Mr Mugabe. The constitution says it should be the current vice-president, Phelekezela Mphoko, a supporter of Grace Mugabe, Mr Mugabe's wife.
Mr Mudenda said moves were under way to ensure a new leader could take over by late on Wednesday.
UK Prime Minister Theresa May said Mr Mugabe's resignation "provides Zimbabwe with an opportunity to forge a new path free of the oppression that characterised his rule".
She said that former colonial power Britain, "as Zimbabwe's oldest friend", will do all it can to support free and fair elections and the rebuilding of the Zimbabwean economy.