HARARE, Zimbabwe (CNN) - Robert Mugabe resigned as Zimbabwe's President on Tuesday after 37 years of autocratic rule, finally succumbing to the pressure of a military takeover and the humiliation of impeachment.
The announcement came minutes into a joint session of the Zimbabwean Parliament in Harare, convened to prise the 93-year-old from power.
As the speaker read out a letter from Mugabe, lawmakers broke out in thunderous applause. The impeachment proceedings were immediately suspended.
Mugabe's successor, according to a spokesman for the ZANU-PF party, will be former Vice President Emmerson Mnangagwa, whose firing by Mugabe precipitated the crisis.
In the streets outside, crowds erupted in rapturous celebrations, dancing and cheering in joy, raising their fists and waving Zimbabwean flags.
It was the culmination of an extraordinary week in the history of Zimbabwe that began when the country's military leaders staged an unprecedented intervention to prevent the ascent to power of Mugabe's 52-year-old wife, Grace.
When the crisis started, it bore all the hallmarks of a coup. At the end, it almost resembled a popular revolt. "We think that this is the work of God," one young man told CNN in Harare. "We were in crisis for a long time, and this is a new day for Zimbabweans."
Mugabe's letter: The ousted President insisted his resignation was voluntary. "I have resigned to allow smooth transfer of power," he wrote. "Kindly give public notice of my decision as soon as possible."
Successor lined up: Mnangagwa was the ZANU-PF's pick to succeed Mugabe, according to Simon Khaya Moyo, a spokesman for the ZANU-PF party. Mnangagwa will be sworn in within 48 hours of the Parliament speaker announcing Mugabe's resignation.
International reaction: Theresa May, the Prime Minister of Britain, from which Zimbabwe gained independence in 1980, said Mugabe's resignation provided the country "with an opportunity to forge a new path free of the oppression that characterized his rule."
Mugabe's announcement was an acknowledgment of the inevitable. In reality, he lost his grip on power six days ago when the country's top generals launched what amounted to a military coup, placing the veteran leader under house arrest.
After nearly four decades of unimpeded rule, which began amid the triumph of independence from Britain, Mugabe's political downfall unfolded in just two weeks.
The crisis began on November 6 when Mugabe fired Mnangagwa as vice president, in an apparent attempt to clear a path for his wife, Grace Mugabe, to succeed him.
Army generals and senior figures in Mugabe's ZANU-PF party, suspicious of the first lady's lavish lifestyle and political ambitions, were horrified by the possibility she could take over.
On Tuesday, tanks were seen outside Harare and in the early hours of Wednesday morning, an army spokesman appeared on state TV to declare that a military operation was underway. By dawn it was clear that Mugabe was under house arrest, and his grip on power ebbing away.
But Mugabe clung to power for a further six days, quitting only after his party ousted him as leader, and Parliament began impeachment proceedings.
The whereabouts of the former President and his wife were unknown on Tuesday. Grace Mugabe -- dubbed "Gucci Grace" for her penchant for extravagant shopping expeditions -- has not been seen since the day of the military takeover. Her husband's last appearance was during a television statement on Sunday night.
What comes next
ZANU-PF ousted Mugabe as leader of the party and installed Mnangagwa in his place on Sunday.
Mnangagwa has not been seen in the country since his dismissal on November 6, but he broke his silence on Tuesday to add his voice to those calling on Mugabe to resign. Mnangagwa, who enjoys widespread support in the military, was widely believed to be in touch with senior generals behind the scenes.
As Zimbabweans celebrated the demise of Mugabe on Tuesday, it was unclear whether they would welcome Mnangagwa.
Nicknamed "The Crocodile" for his political cunning and longevity, Mnanagagwa served as Mugabe's right-hand man for years.
He has been accused of orchestrating a string of massacres in the early 1980s to consolidate Mugabe's power, when he served as the leader's spy chief. The violence left up to 20,000 dead, mostly supporters of Mugabe's political opponents. Mnangagwa denies the allegations.
In late 2000, a cable written by a US diplomat in Harare, Earl Irving, described Mnangagwa as "widely feared and despised throughout the country," warning he could be "an even more repressive leader" than Mugabe if he were to succeed him.
End of an era
Mugabe's resignation marks the end of an era in Zimbabwe. He ruled the country with an iron fist for almost four decades and is the only leader the nation has known since it achieved independence from Britain in 1980.
Mugabe's political demise is the consequence of a struggle over who would succeed him in ZANU-PF, a party split between those loyal to Mnangagwa and supporters of Grace Mugabe.
It was a humiliating departure for Mugabe, who clung onto power for a week but eventually buckled to pressure.
The party he co-founded to usher the country into independence ousted him, the military that he commanded placed him under house arrest and his most powerful allies abandoned him.
Mugabe rose to power as a freedom fighter and was once regarded as Zimbabwe's own Nelson Mandela. But he quickly waged a campaign of oppression to shore up his authority, extinguishing the political opposition through violent crackdowns.
Mugabe's hardline policies also pushed the country into poverty. Its flourishing economy began to disintegrate after a program of land seizures from white farmers, and agricultural output plummeted and inflation soared.
Over the decades, Mugabe and his wife faced fierce criticism for leading lavish lifestyles as the country was plunged into economic ruin.
The chairman of the African Union Commission said he welcomed Mugabe's decision to step down.
"Today's decision will go down in history as an act of statesmanship that can only bolster President Mugabe's political legacy," Moussa Faki Mahamat said in a statement.
"The African Union recognizes that the Zimbabwean people have expressed their will that there should be a peaceful transfer of power in a manner that secures the democratic future of their country. President Mugabe's decision to resign paves the way for a transition process, owned and led by the sovereign people of Zimbabwe."
Copyright 2017 by CNN NewSource. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.