Robert Mugabe has resigned as Zimbabwe's president, shortly after Parliament began an impeachment process to end his nearly four decades of rule.

Key points: Wild celebrations break out in Parliament and on streets

Wild celebrations break out in Parliament and on streets Robert Mugabe says he wants "smooth transition of power"

Robert Mugabe says he wants "smooth transition of power" Former vice-president Emmerson Mnangagwa expected to take over as leader

Wild celebrations broke out at a joint sitting of Parliament when Speaker Jacob Mudenda announced 93-year-old Mr Mugabe's resignation and suspended the impeachment procedure.

"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," said Mr Mugabe in the letter read out in Parliament.

Mr Mugabe's resignation letter made no mention of who he was leaving in charge of the country.

However, ruling ZANU-PF party legal secretary Patrick Chinamasa said former vice-president Emmerson Mnangagwa, whose sacking this month prompted the military takeover that forced Mugabe out, will be sworn in as president either today or tomorrow.

The Speaker said he was working on legal issues to make sure a new leader was in place by the end of today.

Celebrations on the streets

Thousands of Zimbabweans poured onto the streets of Harare at the news of Mr Mugabe's resignation, with the capital erupting in dancing, singing, honking and cheers.

Sorry, this video has expired Zimbabweans celebrate outside Parliament after Robert Mugabe resignation (Image: AP/Ben Curtis)

Some people were holding posters of Zimbabwean army chief Constantino Chiwenga and Mr Mnangagwa, whose sacking this month triggered the military takeover that forced Mr Mugabe to resign.

Zimbabwe's military commander warned people not to target old adversaries following the resignation.

"Acts of vengeful retribution or trying to settle scores will be dealt with severely," General Chiwenga said.

Opposition leader Morgan Tsvangirai said he was hoping for a return to democracy and the rule of law with Mr Mugabe's departure.

He said the next leader must set a new trajectory that respects citizens' rights and put an end to the atmosphere cultivated by Mr Mugabe for nearly four decades.

"My hope and wish is that we're able to craft a transitional framework in the next elections which'll put in place the issue of reforms, the issue of free and fair elections as per the constitution," he said.

British Prime Minister Theresa May said the resignation gave Zimbabwe "an opportunity to forge a new path free of the oppression that characterised his rule".

Ms May said the Zimbabwean people have shown they want "free and fair elections and the opportunity to rebuild the country's economy under a legitimate government".

Sorry, this video has expired Analyst Piers Pigou talks to 7.30 about Mugabe's resignation

The US Embassy in Zimbabwe said it was "an historic moment" for the country and congratulated all Zimbabweans who raised their voices.

"Whatever short-term arrangements the government may establish, the path forward must lead to free, fair and inclusive elections," a statement said.

Mnangagwa expected to take over leadership

Zimbabweans celebrate Mugabe's resignation at an intersection in downtown Harare. ( AP: Ben Curtis )

Mr Mnangagwa, whose whereabouts is unknown after fleeing the country in fear for his safety, is seen as the most likely to take over.

A former security chief known as The Crocodile, he was a chief lieutenant to Mr Mugabe for decades and stands accused of participating in repression against Zimbabweans who challenged the leader.

Ruling party official party Lovemore Matuke said Mr Mnangagwa would take over as the country's leader within 48 hours.

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 clung on for a week after the army takeover and expulsion from his own ruling ZANU-PF party, which also told him to leave power.

His resignation brought an end to impeachment proceedings brought by the ruling ZANU-PF party.

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.

The origin of Mr Mugabe's sudden downfall lies in rivalry between members of Zimbabwe's ruling elite over who will succeed him, rather than popular protests against his rule.

Mr Mugabe, who was the world's oldest head of state, is the only leader Zimbabwe has known since a guerrilla struggle ended white-minority rule in the former Rhodesia in 1980.

Zimbabweans celebrate Robert Mugabe's resignation outside Parliament. ( AP: Ben Curtis )

Reuters/AP