Mr Robert Mugabe, who came to power nearly 40 years ago, was on Friday replaced by his former loyalist Emmerson Mnangagwa as president of Zimbabwe, a nation of 16 million people.
A former teacher, Mr Mugabe was jailed for 11 years for his political beliefs, but rose in 1980 to become head of state of what was a white-led country called Southern Rhodesia.
Before his ouster, the 93-year-old was the world's oldest head of state.
Shaping of a political mind: 1924-1960
Mr Mugabe was born in 1924 in Kutama, north-west of the capital of Harare in what was then Southern Rhodesia, a self-governing British colony.
His father abandoned the family in poverty when he was 10.
He was educated by Catholic missionaries and later attended the same university in South Africa as Nelson Mandela.
He was heavily influenced as a young man by the leaders of the Indian independence movement, including Mahatma Gandhi and Jawaharlal Nehru. While at university, from 1950 to 1952, he decided that he wanted to be a politician.
Beginning of a movement: 1960-1964
After teaching in what was then Northern Rhodesia (now Zambia) and Ghana, Mr Mugabe returned to Southern Rhodesia in 1960. There he joined the movement led by Joshua Nkomo, who was the patriarch of the African nationalist struggle in the country.
He became a leader in it, as the National Democratic Party's publicity secretary, and gave up teaching.
At the time, the British government was seeking a path forward for Southern Rhodesia, as racial resentment swelled. Mr Mugabe's stance in favour of political violence put him at odds with Nkomo.
Mr Mugabe formed the Zimbabwe African National Union, or Zanu.
In 1963, Mr Mugabe and many of his allies were arrested, and he spent 11 years in prison.
The prison years: 1964-1975 As Mr Mugabe was beginning his long term in prison, Southern Rhodesia's white minority, which had won power by opposing African nationalism, unilaterally declared independence from Britain.
That government refused to let Mr Mugabe attend the funeral of his only child, who died while he was in prison, which stoked his resentment of the regime.
During his years in prison, he organised classes among the inmates and continued to communicate with members of his party who were on the outside.
Rise to power: 1975-1980
After his time in prison, Mr Mugabe left the country in 1975 for Mozambique, which had just attained independence, and worked to win the acceptance of the guerillas from his political party, who in 1972 had begun to fight against the Rhodesian ruling party.
Eventually becoming the voice of the guerilla movement, Mr Mugabe became known on the world stage.
In 1976, he was forced back into an alliance with Nkomo under pressure from African leaders and after British-brokered peace talks in 1979 that established the independent state of Zimbabwe.
This set the stage for a national election and Mr Mugabe returned home from exile.
Independence and violence: 1980-1988
Mr Mugabe was reluctant to agree to the British pact. But he won a resounding victory in the new country's election to become prime minister, after taking pains not to alienate the country's white populace.
After taking power, he pledged to oversee a government whose watchwords would be peace and unity. But within the next two years, he dismissed Nkomo from his Cabinet as his followers began to battle those of his former ally.
It was the prelude to more violence.
Between 1983 and 1985, Mr Mugabe sent a military brigade into the country's western region, where much of Nkomo's support was based, to hunt down dissidents. An estimated 10,000 people were killed in the campaign, the vast majority of them civilians.
The executive president: 1988-2008
After a change in the country's Constitution, Mr Mugabe became president in 1988, a vastly more powerful role than prime minister.
For the next 12 years, he went relatively unchallenged, as government investments in education and health led the country to prosper for a time.
But in the 1990s, things began to deteriorate, and in 2000, facing newly empowered political opponents, Mr Mugabe supported gangs of young men who had begun to seize white-owned farms.
Soon afterwards, he decreed that the government itself could seize farms without paying the landowners.
The uprising came at a high cost, as food shortages increased and the economy declined. Mr Mugabe faced increased international pressure to step down.
A slow, then rapid, decline: 2008-2017
Mr Mugabe's singular position as one of the longest-reigning heads of the anti-colonialist movement made it difficult for international pressure to have a direct impact.
Within the country, he clung to power by any means necessary.
In disputed elections in 2008, beatings and killing of opposition supporters forced his opponent to withdraw from the race, even after he had outpolled Mr Mugabe in a presidential vote.
Mr Mugabe won disputed elections again in 2013, making it seem likely that he would remain in power for as long as he was able to rule.
But the military's sudden move, which came with little warning, has put an unexpected end to his 37 years in power.