JOHANNESBURG (Reuters) - Jacob Zuma resigned as South African president late on Wednesday, under pressure from allies of Deputy President Cyril Ramaphosa, who replaced him as leader of the ruling African National Congress (ANC) in December.
The 75-year-old's resignation caps the end of a tumultuous decade in which Zuma has survived several no-confidence votes in parliament, a string of corruption allegations and street protests against his rule.
Below are some of the main scandals involving Zuma. Some date from before he became president in 2009.
Zuma is still fighting 783 counts of corruption over a 30 billion rand (now £1.78 billion) government arms deal arranged in the late 1990s when he was deputy president.
The charges were set aside in 2009, paving the way for Zuma to run for president, but were re-instated in 2016 by the Supreme Court.
While deputy president of the ANC, Zuma was charged with raping Fezekile "Khwezi" Kuzwayo, the HIV-positive daughter of a friend who had been imprisoned on Robben Island with Zuma during the apartheid era.
Zuma was acquitted in 2006 but was ridiculed after saying he had showered after sex to reduce the risk of contracting HIV.
Soon after becoming president, it emerged that millions of dollars of public money had been spent on upgrades to Zuma's Nkandla home, including a swimming pool that one minister justified as a fire-fighting resource.
Zuma weathered a no-confidence vote in parliament over the upgrades and paid back more than $500,000 after unsuccessfully trying to argue his case in the Constitutional Court.
Zuma apologised to South Africans in 2010 after fathering a child out of wedlock with his friend Irvin Khoza's daughter, Sonono Khoza.
Zuma, a polygamist, had promised the ANC's leadership he would not engage in extramarital sex after the Khwezi episode.
Zuma caused controversy in 2012 for scolding black people "who become too clever" in an address to South Africa's National House of Traditional Leaders, saying "they become the most eloquent in criticising themselves about their own traditions".
Zuma, who received no formal schooling, has a loyal following in rural areas but has tended to receive less support in urban areas where education levels are higher.
Zuma's friends, the Gupta brothers, used the top-security Waterkloof air base to fly in 200 wedding guests from India for a family member's wedding in 2013, sparking a public outcry.
The ANC called the landing reckless and a breach of national security.
Zuma fired finance minister Nhlanhla Nene in December 2015, replacing him with unknown parliamentary backbencher Des van Rooyen. Zuma was forced to sack van Rooyen and re-appoint a previous finance minister, Pravin Gordhan, four days later after the rand currency collapsed.
The ANC lost its grip on local government in three metropolitan areas in 2016, the ruling party's worst election result since the end of white minority rule in 1994. Unemployment, economic stagnation and scandals around Zuma were among reasons the ANC lost voter support.
In 2016, the Public Protector, South Africa's main anti-corruption watchdog, published a report entitled "State of Capture" alleging the Guptas had tried to influence the appointment of cabinet ministers and were unlawfully awarded state tenders.
Central to the report was the claim by then-deputy finance minister Mcebisi Jonas that Zuma's son Duduzane invited him to the Gupta family home where he was offered the job of finance minister and a bribe of 600 million rand.
The Guptas and Zuma have denied any wrongdoing. The Public Protector recommended a judicial enquiry be set up to investigate grand-level corruption involving Zuma and the Guptas.
Zuma fired Gordhan as finance minister and Jonas as deputy finance minister in a midnight reshuffle in March 2017. South African financial markets plummeted, with senior ANC officials expressing anger at the lack of consultation.
(Editing by James Macharia and David Stamp)