But the hope that accompanied independence in 1980 dissolved into violence, corruption and economic disaster.
President Mugabe became an outspoken critic of the West, most notably the United Kingdom, the former colonial power, which he denounced as an “enemy country”.
Despite his brutal treatment of political opponents, and his economic mismanagement of a once prosperous country, he continued to attract the support of other African leaders.
Robert Gabriel Mugabe was born in what was then Rhodesia on 21 February 1924, the son of a carpenter and one of the majority Shona-speaking people. Educated at Roman Catholic mission schools, he qualified as a teacher.
Winning a scholarship to Fort Hare University in South Africa, he took the first of his seven academic degrees before teaching in Ghana, where he was greatly influenced by the pan-Africanist ideas of Ghana’s post-independence leader Kwame Nkrumah. His first wife Sally was Ghanaian.
In 1960, Mugabe returned to Rhodesia. At first he worked for the African nationalist cause with Joshua Nkomo, before breaking away to become a founder member of the Zimbabwe African National Union (Zanu).
In 1964, after making a speech in which he called Rhodesian Prime Minister Ian Smith and his government “cowboys”, Mugabe was arrested and detained without trial for a decade.
His baby son died while he was still in prison and he was refused permission to attend the funeral.
In 1973, while still in detention, he was chosen as president of Zanu. After his release, he went to Mozambique and directed guerrilla raids into Rhodesia. His Zanu organisation formed a loose alliance with Nkomo’s Zimbabwe African People’s Union (Zapu).
During the tortuous negotiations on independence for Rhodesia, he was seen as the most militant of the black leaders, and the most uncompromising in his demands.
On a 1976 visit to London, he declared that the only solution to the Rhodesian problem would come out of the barrel of a gun.
But his negotiating skills earned him the respect of many of his former critics. The press hailed him as “the thinking man’s guerrilla”.
The Lancaster House agreement of 1979 set up a constitution for the new Republic of Zimbabwe, as Rhodesia was to be called, and set February 1980 for the first elections to the new government.
Fighting the election on a separate platform from Nkomo, Mugabe scored an overwhelming and, to most outside observers, unexpected victory. Zanu secured a comfortable majority, although the polls were marred by accusations of vote-rigging and intimidation from both sides
A self-confessed Marxist, Mugabe’s victory initially had many white people packing their bags ready to leave Rhodesia, while his supporters danced in the streets.
However, the moderate, conciliatory tone of his early statements reassured many of his opponents. He promised a broad-based government, with no victimisation and no nationalisation of private property. His theme, he told them, would be reconciliation.
Later that year he outlined his economic policy, which mixed private enterprise with public investment.
With the prime minister frequently advocating one-party rule, the rift between Mugabe and Nkomo widened.
After the discovery of a huge cache of arms at Zapu-owned properties, Nkomo, recently demoted in a cabinet reshuffle, was dismissed from government.
While paying lip service to democracy, Mugabe gradually stifled political opposition. The mid-1980s saw the massacre of thousands of ethnic Ndebeles seen as Nkomo’s supporters in his home region of Matabeleland.
Mugabe was implicated in the killings, committed by the Zimbabwean army’s North Korean-trained 5th Brigade, but never brought to trial.
Under intense pressure, Nkomo agreed for his Zapu to be merged with – or taken over by – Zanu to become the virtually unchallenged Zanu-PF.
After abolishing the office of prime minister, Mugabe became president in 1987 and was elected for a third term in 1996.
The same year, he married Grace Marufu, after his first wife had died from cancer. Mugabe already had two children with Grace, 40 years his junior. A third was born when the president was 73.
He did have some success in building a non-racial society, but in 1992 introduced the Land Acquisition Act, permitting the confiscation of land without appeal.
The plan was to redistribute land at the expense of more than 4,500 white farmers, who still owned the bulk of the country’s best land.
In early 2000, with his presidency under serious threat from the newly formed Movement for Democratic Change (MDC), led by former trade union leader Morgan Tsvangirai, Mugabe lashed out against the farmers, seen as MDC backers.
His supporters, the so-called “war veterans”, occupied white-owned farms and a number of farmers and their black workers were killed.
The action served to undermine the already battered economy as Zimbabwe’s once valuable agricultural industry fell into ruin. Mugabe’s critics accused him of distributing farms to his cronies, rather than the intended rural poor.
Zimbabwe moved rapidly from being one of Africa’s biggest food producers to having to rely on foreign aid to feed its population.
In the 2000 elections for the House of Assembly, the MDC won 57 out of the 120 seats elected by popular vote, although a further 20 seats were filled by Mugabe’s nominees, securing Zanu-PF’s hold on power
Two years later, in the presidential elections, Mugabe achieved 56.2% of the vote compared with Mr Tsvangirai’s 41.9% against a background of intimidation of MDC supporters. Large numbers of people in rural areas were prevented from voting by the closure of polling stations.
With the MDC, the US, UK and the European Union not recognising the election result because of the violence and allegations of fraud, Mugabe – and Zimbabwe – became increasingly isolated.
The Commonwealth also suspended Zimbabwe from participating in its meetings until it improved its record as a democracy.
In May 2005, Mugabe presided over Operation Restore Order, a crackdown on the black market and what was said to be “general lawlessness”.
Some 30,000 street vendors were arrested and whole shanty towns demolished, eventually leaving an estimated 700,000 Zimbabweans homeless.
In March 2008, Mugabe lost the first round of the presidential elections but won the run-off in June after Mr Tsvangirai pulled out.
In the wake of sustained attacks against his supporters across the country, Mr Tsvangirai maintained that a free and fair election was not possible.
Zimbabwe’s economic decline accelerated, with inflation rates reaching stratospheric levels.
After hundreds of people died from cholera, partly because the government could not afford to import water treatment chemicals, Mugabe agreed to negotiate with his long-time rival about sharing power.
After months of talks, in February 2009 Mugabe swore in Mr Tsvangirai as prime minister.
It came as no surprise that the arrangement was far from perfect, with constant squabbling and accusations by some human rights organisations that Mugabe’s political opponents were still being detained and tortured.
Mr Tsvangirai’s reputation also suffered by his association with the Mugabe regime, despite the fact that he had no influence over the increasingly irascible president.
The 2013 election, in which Mugabe won 61% of the vote, ended the power-sharing agreement and Mr Tsvangirai went into the political wilderness.
While there were the usual accusations of electoral fraud – UN Secretary-General Ban Ki-moon asked that these be investigated – there was not the widespread violence that had marked previous polls in Zimbabwe.
It was an election that saw Robert Mugabe, at the age of 89, confirm his position as the undisputed power in the country.
His advancing years, and increasing health problems, saw much speculation as to who might replace him.
But the manoeuvring among possible successors revealed how fragmented Zimbabwe’s administration was and underlined the fact that it was only held together by Mugabe’s dominance.
Mugabe himself seemed to delight in playing off his subordinates against each other in a deliberate attempt to dilute whatever opposition might arise.
With speculation that his wife, Grace, was poised to take control in the event of his death in office, Mugabe announced in 2015 that he fully intended to fight the 2018 elections, by which time he would be 94.
And, to allay any doubt remaining among possible successors, he announced in February 2016 that he would remain in power “until God says ‘come'”.
In the event it wasn’t God but units of the Zimbabwe National Army which came for Robert Mugabe. On 15 November 2017 he was placed under house arrest and, four days later, replaced as the leader of Zanu-PF by his former vice-president, Emmerson Mnangagwa.
Defiant to the end Mugabe refused to resign, But, on 21 November, as a motion to impeach him was being debated in the Zimbabwean parliament, the speaker of the House of Assembly announced that Robert Mugabe had finally resigned.
Mugabe negotiated a deal which protected him and his family from the risk of future prosecution and enabled him to retain his various business interests. He was also granted a house, servants, vehicles and full diplomatic status.
Ascetic in manner, Robert Mugabe dressed conservatively and drank no alcohol. He viewed both friend and foe with a scepticism verging on the paranoid.
The man who had been hailed as the hero of Africa’s struggle to throw off colonialism had turned into a dictator, trampling over human rights and turning a once prosperous country into an economic basket case.
His legacy is likely to haunt Zimbabwe for years.