Zimbabwe’s Robert Mugabe has resigned as president after 37 years in power, as parliament began impeachment proceedings against him.

The capital, Harare, erupted in jubilation after news spread that the 93-year-old leader’s resignation letter was read out by the speaker of parliament, whose members had gathered to impeach Mr Mugabe after he ignored escalating calls to quit since a military takeover.

Cars honked and people danced and sang across the city in a spectacle of free expression that would have been impossible during his rule.

Members of the House of Assembly sit inside the Zimbabwean <a href=Parliament in Harare">(AP Photo/Aaron Ufumeli)

“Welcome to the new Zimbabwe,” people chanted outside a conference centre where the politicians met.

“Change was overdue… Maybe this change will bring jobs,” said 23-year-old Thomas Manase, an unemployed university graduate.

Mr Mugabe, who was the world’s oldest head of state, said in his letter that legal procedures should be followed to install a new president “no later than tomorrow”.

“My decision to resign is voluntary on my part and arises from my concern for the welfare of the people of Zimbabwe and my desire for a smooth, non-violent transfer of power,” Mr Mugabe said in the message read out by parliamentary speaker Jacob Mudenda.

Protesters outside Zimbabwe's parliament cheer the news of Robert Mugabe's resignationProtesters outside Zimbabwe’s parliament cheer the news of Robert Mugabe’s resignation (AP Photo/Ben Curtis)

Recently fired vice president Emmerson Mnangagwa would take over as the country’s leader within 48 hours, said a ruling party official, Lovemore Matuke.

Mr Mnangagwa, who fled the country after his removal on November 6, “is not far from here,” Mr Matuke said.

Mr Mugabe can participate in a formal handover of power “so that Mnangagwa moves with speed to work for the country,” Mr Matuke said.

Mr Mugabe’s resignation brought an end to impeachment proceedings brought by the ruling ZANU-PF party after its Central Committee voted to oust the president as party leader and replace him with Mr Mnangagwa, a former ally of Mr Mugabe who served for decades as his enforcer with a reputation for being astute and ruthless, more feared than popular.

Speaker of the National Assembly Jacob MudendaSpeaker of the National Assembly Jacob Mudenda (AP Photo/Aaron Ufumeli)

Before the resignation, crowds rallied outside the parliament building, dancing and singing. Some people placed photos of Mr Mugabe in the street so that cars would run over them.

Opposition leader Morgan Tsvangirai of the MDC party said the culture of the ruling party “must end” and everyone must put their heads together and work towards free and fair elections. His party had seconded the impeachment motion.

Earlier on Tuesday, Mr Mnangagwa said in a statement that Mr Mugabe should acknowledge the nation’s “insatiable desire” for a leadership change and resign immediately.

Mr Mnangagwa, a former justice and defence minister, added to the pressure on Mr Mugabe to quit after a long rule during which he evolved from a champion of the fight against white minority rule into a figure blamed for a collapsing economy, government dysfunction and human rights violations.

Robert Mugabe and his wife GraceRobert Mugabe and his wife Grace (AP Photo, File)

“Never should the nation be held at ransom by one person ever again, whose desire is to die in office at whatever cost to the nation,” said Mr Mnangagwa, who has a loyal support base in the military.

Zimbabwe’s polarising first lady, Grace Mugabe, had been positioning herself to succeed her husband, leading a party faction that engineered Mr Mnangagwa’s removal.

The prospect of a dynastic succession alarmed the military, which confined Mr Mugabe to his home last week and targeted what it called “criminals” around him who allegedly were looting state resources – a reference to associates of the first lady.

Mrs Mugabe has not been seen since the military stepped in.

Mr Mnangagwa was targeted by US sanctions in the early 2000s for undermining democratic development in Zimbabwe, according to the Atlantic Council, a US-based policy institute.

However, J Peter Pham, an Africa expert at the council, noted that some Zimbabwean opposition figures have appeared willing to have dialogue with Mr Mnangagwa in order to move the country forward, and that the international community should consider doing the same.

“We’re not saying whitewash the past, but it is in the interests of everyone that Zimbabwe is engaged at this critical time,” Mr Pham said in a statement.

On Tuesday, Zimbabweans simply enjoyed the moment.

“Today’s a good day,” said Eric Machona, a Harare resident. “People are very happy.”