Robert Mugabe, the revolutionary war hero who helped end white minority rule in Zimbabwe but replaced it with decades of brutality and corruption, had always said he would give up power on his own terms and rule until he was 100.
In the end, he did neither: The 93-year-old president, facing impeachment, a defiant military and angry crowds chanting for his departure, quietly relinquished power Tuesday in a letter delivered to the speaker of the parliament.
"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 to ensure a smooth, peaceful and non-violent transfer of power that underpins national security, peace and stability," said the letter, which ended four days of nail-biting brinkmanship over whether he would heed calls to step aside.
When Mugabe took power in 1980, Zimbabweans joyfully celebrated the liberation hero who ended decades of white minority rule. After his rule became increasingly oppressive and dysfunctional, they celebrated his departure with equal euphoria.
Young Zimbabweans have never known another leader, and some seemed barely able to believe the news he had finally quit office.
Justina Chitongo, 19, graduated high school last year and said she hoped the transition to new leadership would revive the economy and enable her parents to pay her university fees.
"I am happy he is no longer president of my beloved Zimbabwe. We had suffered under this man. Gone, gone, he is gone, and together with his wife, Grace, must go and stay at their rural home in Zvimba," she said, as car horns blasted across the streets of the capital, Harare, and people celebrated exuberantly.
U.S. officials called for a speedy restoration of civilian democracy and early elections.
"Today marks a historic moment for Zimbabwe. We congratulate all Zimbabweans who raised their voices and stated peacefully and clearly that the time for change was overdue," U.S. Secretary of State Rex Tillerson said in a statement.
"Whatever short-term arrangements the government may establish, the path forward must lead to free and fair elections. The people of Zimbabwe must choose their own leaders."
Mugabe was kept in power by the militarized state he helped create: The intelligence agency cast a pall of fear, and the military was given the ability to regularly interfere in the country's political life.
Although he came to power as a liberating hero, Mugabe's propensity for violent repression was obvious from the beginning. One of his early actions was to launch an operation in southern Zimbabwe to crush the opposition, called Gukurahundi — meaning "the early rain which washes away the chaff before the spring rains." The opposition was seen as "chaff" — and some 20,000 people were massacred. Mugabe later dismissed it as "a moment of madness."
Mugabe has long seen himself, one of the continent's elder statesmen, with no political peers. But he presided over a country struggling with unemployment of around 90%, a dire currency crisis and impoverished health and education sectors.
By nature he was not a democrat and tried to push for one-party rule during the 1980s but failed. He sent party delegations to North Korea.
When an opposition movement emerged out of the union movement in the late 1990s, Mugabe was determined to crush it and launched violent attacks on activists, who were arrested, held in military-style camps, beaten and killed.
In 2000 he launched farm seizures, taking the land of white farmers without compensation, a policy that won support among his supporters, but saw economic collapse in a country largely dependent on agriculture.
In 2005 he launched a massive piece of social engineering, ordering the army to destroy informal businesses and dwellings in opposition strongholds in cities and towns across the nation. Up to a million people lost all they had and were forced to leave towns and go to live in rural villages.
Fellow leaders in neighboring countries — awed by his status as a liberation hero and elder statesman of Africa — were loath to criticize the human rights abuses under his rule. Some seemed inspired by his refusal to leave office, and ditched term limits in their own countries so they could also cling to power.
Mugabe's government tilted election outcomes in its favor, with a notorious electoral roll full of ghost voters. Opposition areas faced punitive measures including the denial of food aid.
In 2008, Mugabe nearly lost power when he came in second to opposition leader Morgan Tsvangirai in the first round of presidential elections. Across the country, opposition supporters were rounded up, severely beaten and jailed in military-style bases, prompting Tsvangirai to abandon the second round of the election. A national unity government was set up, but Mugabe made sure to keep hold of the military and security services before resuming full control after elections in 2013.
In his later years — increasingly frail but as stubborn and ruthless as ever— he was often ridiculed for falling asleep in public meetings.
As Mugabe prepared to install his unpopular wife, Grace, as vice president, many people across Zimbabwe, including members of his ruling ZANU-PF party, feared she would succeed him if he died in office.
The resignation came several days after the military moved in to remove him from most of the levers of power. Mugabe faced a possible swift official removal by parliament through impeachment after only a few Cabinet ministers appeared at a meeting he called Tuesday.
Parliament erupted into cheers after his resignation was read out.
"I'm overjoyed. This is a wonderful day, not only in the history of Zimbabwe but for the world," Minah Mandaba, a member of the ruling ZANU-PF party's Central Committee, said as she danced and cheered after the parliament meeting.
Mugabe managed to hang on for a week after Zimbabwe's military stripped him of executive power, confined him to his house and arrested his political allies, including a group of senior government ministers.
His departure paves the way for former Vice President Emmerson Mnangagwa — who was fired last week by Mugabe — to take power and lead the country, with elections due early next year. Mnangagwa was expected to take over within 48 hours, according to ZANU-PF officials.
Opposition and government supporters celebrated as darkness fell.
"I will always remember this day," said unemployed 25-year-old Brian Tumbare, while drinking from a bottle of beer. "I have suffered for too long, and I am just loving every moment of it. It's like our independence day."
"At last we are free from this man and his mad wife. At least we can now hope to get jobs," said Hilda Shoko, 30, a hairdresser.
Mnangagwa, a former state security minister nicknamed "the Crocodile," is also seen as ruthless, but is expected to usher in economic changes designed to revive the economy.
Mnangagwa, who has been in hiding since Mugabe sacked him, made his first public statement Tuesday since the army took power, calling on Mugabe to resign.
He said the military action to take control of the country was code-named Operation Restore Legacy and was "aimed at preserving the ethos of our struggle against British colonialism."
After Mugabe's resignation, a message was sent from the Twitter account of higher education minister Jonathan Moyo, who was part of a ZANU-PF faction close to Grace Mugabe and whose ouster was said to be one of the targets of the military takeover. After the military moved in, Moyo was arrested.
"I'm grateful for the opportunity to have served my country under & with him. I'm proud that I stood with & by this iconic leader during the trying moments of the last days of his Presidency," Moyo's tweet said. "Democracy requires politics to lead the gun!"
Dixon reported from Johannesburg, South Africa, and Mangudya reported from Harare. Special correspondent Tawanda Karombo in Harare and Times staff writer Tracy Wilkinson in Washington contributed to this report.
5:05 p.m.: This article was updated with additional background, context and reaction.
2:05 p.m.: This article was updated with more reaction, including from the U.S. State Department.
12:25 p.m.: This article was updated with additional reaction and details.
8:40 a.m.: This article was updated with Times staff reporting.
8 a.m.: This article was updated with Mugabe's resignation