Robert Mugabe, the man who became synonymous with Zimbabwe, has resigned as president after 37 years in power.
For some, he will always remain a hero who brought independence and an end to white-minority rule. Even those who forced him out blamed his wife and "criminals" around him.
But to his growing number of critics, this highly educated, wily politician became the caricature of an African dictator, who destroyed an entire country in order to keep his job.
In the end, it was the security forces, who had been instrumental in intimidating the opposition and keeping him in power, who made him go.
They were incensed when he sacked his long-time ally, Vice-President Emmerson Mnangagwa, paving the way for his much younger wife Grace to succeed him, fearing it meant the end for them as the powers behind the throne.
He had survived numerous previous crises and predictions of his demise but with his powers failing at the age of 93, his former comrades-in-arms turned on him, favouring Mr Mnangagwa.
Before the 2008 elections, Mr Mugabe said: "If you lose an election and are rejected by the people, it is time to leave politics."
But after coming second to Morgan Tsvangirai, Mr Mugabe displayed more characteristic defiance, swearing that "only God" could remove him from office.
And just to be sure, violence was unleashed to preserve his grip on power.
In order to save the lives of his supporters, Mr Tsvangirai pulled out of the second round and although Mr Mugabe was forced to share power with his long-time rival for four years, he remained president.
He even won another election, in 2013, as Mr Tsvangirai had lost a lot of credibility during his years working with Mr Mugabe.
The key to understanding Mr Mugabe is the 1970s guerrilla war where he made his name.
Robert Mugabe - Timeline
- 1924: Born
- Later trained as a teacher
- 1964: Imprisoned by Rhodesian government
- 1980: Wins post-independence elections
- 1996: Marries Grace Marufu
- 2000: Loses referendum, pro-Mugabe militias invade white-owned farms and attack opposition supporters
- 2008: Comes second in first round of elections to Tsvangirai who pulls out of run-off amid nationwide attacks on his supporters
- 2009: Amid economic collapse, swears in Tsvangirai as prime minister, who served in uneasy government of national unity for four years
- 2017: Sacks long-time ally Vice-President Emmerson Mnangagwa, paving the way for his wife Grace to succeed him.
- Army intervenes and forces him to step down
Even after 37 years in power, Mr Mugabe still maintained the same worldview - the patriotic socialist forces of his Zanu-PF party were still fighting the twin evils of capitalism and colonialism.
Any critics were dismissed as "traitors and sell-outs" - a throwback to the guerrilla war, when such labels could be a death sentence.
He always blamed Zimbabwe's economic problems on a plot by Western countries, led by the UK, to oust him because of his seizure of white-owned farms.
His critics firmly blamed him, saying he had no understanding of how a modern economy worked.
He always concentrated on the question of how to share out the national cake, rather than how to make it grow.
Mr Mugabe once famously said that a country could never go bankrupt - with the world's fastest-shrinking economy and annual inflation of 231 million per cent in July 2008, it seemed as though he was determined to test his theory to the limit.
Professor Tony Hawkins of the University of Zimbabwe once observed that with Zimbabwe's former leader: "Whenever economics gets in the way of politics, politics wins every time."
In 2000, faced with a strong opposition for the first time, he wrecked what was one of Africa's most diversified economies in a bid to retain political control.
He seized the white-owned farms which were the economy's backbone and scared off donors but in purely political terms, Mr Mugabe outsmarted his enemies - he remained in power for another 17 years.
At any cost
And the tactics he and his supporters used were straight from the guerrilla war.
After he suffered the first electoral defeat of his career, in a 2000 referendum, Mr Mugabe unleashed his personal militia - the self-styled war veterans, backed by the security forces - who used violence and murder as an electoral strategy.
Eight years later, a similar pattern was followed after Mr Mugabe lost the first round of a presidential election to his long-time rival Morgan Tsvangirai.
When needed, all the levers of state - the security forces, civil service, state-owned media - which are mostly controlled by Zanu-PF, were used in the service of the ruling party.
The man who fought for one-man, one-vote introduced a requirement that potential voters prove their residence with utility bills, which the young, unemployed opposition core electorate were unlikely to have.
In fact, the signs of his attitude to opposition were there from the early 1980s, when members of the North-Korea trained Fifth Brigade of the army were sent to Matabeleland, home to his then rival, Joshua Nkomo.
Thousands of civilians were killed before Mr Nkomo agreed to share power with Mr Mugabe - a precursor of what happened with Mr Tsvangirai.
One of the undoubted achievements of the former teacher's 33 years in power was the expansion of education. Zimbabwe still has one of the highest literacy rates in Africa, at 89% of the population.
The now deceased political scientist Masipula Sithole once said that by expanding education, the president was "digging his own grave".
The young beneficiaries were able to analyse Zimbabwe's problems for themselves and most blamed government corruption and mismanagement for the lack of jobs and rising prices.
He often claimed to be fighting on behalf of the rural poor but much of the land he confiscated ended up in the hands of his cronies.
Archbishop Desmond Tutu once said that Zimbabwe's long-time president had become a cartoon figure of the archetypal African dictator.
During the 2002 presidential campaign, he started wearing brightly coloured shirts emblazoned with his face - a style copied from many of Africa's authoritarian rulers.
For the preceding 20 years, this conservative man was only seen in public with either a stiff suit and tie or safari suit.
He professes to be a staunch Catholic, and worshippers at Harare's Catholic Cathedral were occasionally swamped by security guards when he turned up for Sunday Mass.
However, Mr Mugabe's beliefs did not prevent him from having two children by Grace, then his secretary, while his popular Ghanaian first wife, Sally, was dying from cancer.
But it was his second wife Grace, 40 years his junior, who ultimately proved his downfall.
Although Mr Mugabe outlived many predictions of his demise, the increasing strain of recent years took its toll and his once-impeccable presentation has begun to look rather worn at times.
In 2011, a US diplomatic cable released by Wikileaks suggested that he was suffering from prostate cancer.
But he certainly led a healthy lifestyle.
Grace once said that he woke up at 05:00 for his daily exercises, including yoga. He did not drink alcohol or coffee and was largely vegetarian.
Mr Mugabe was 73 when she gave birth to their third child, Chatunga.
If nothing else, Mr Mugabe has always been an extremely proud man.
He often said he would only step down when his "revolution" was complete.
He was referring to the redistribution of white-owned land but he also wanted to hand-pick his successor, who would of course have had to come from the ranks of Zanu-PF.
Didymus Mutasa, once one of Mr Mugabe's closest associates but who has since fallen out with him, once told the BBC that in Zimbabwean culture, kings were only replaced when they die "and Mugabe is our king".
But even his closest allies were not ready for Zimbabwe to be turned into a monarchy, with power retained by a single family.