Jacob Zuma: The dates that explain why S Africa president quit
Jacob Zuma has resigned as president of South Africa after facing pressure from his own party to do so.
His presidency covered more than a third of South Africa's time after apartheid, but it was dogged by scandal.
So what led to him quitting? Here's a timeline of the key events.
14 June 2005: Out of a job
At this point, Mr Zuma had been a popular and charismatic deputy president of South Africa for six years - but he lost his job after being implicated in a corruption trial.
He had long been viewed as a possible successor to then-President Thabo Mbeki.
As a teenager, he had joined the fight against apartheid with the African National Congress (ANC) and its underground military wing before being jailed on Robben Island with Nelson Mandela.
In 1997, he became the deputy president of the ruling ANC, and was then named as South Africa's deputy president in 1999.
Later, he became embroiled in controversy over a 30bn rand ($5bn; £3bn in 2009) arms deal involving a number of European companies.
Mr Zuma's financial adviser, Schabir Shaik, went on to be found guilty of corruption and fraud.
During the trial, Mr Zuma was implicated in the corruption allegations, and while he has always denied the claims, he lost his job. He was charged in 2007.
6 April 2009: An eventful two weeks
Mr Zuma's race for the presidency was in its last stretch when prosecutors dropped the charges against him over the arms deal.
South Africa's chief prosecutor said phone-tap evidence suggested the 2007 charges had been politically motivated.
The main opposition called it an "abuse" of the prosecutor's role. However Mr Zuma, by then the president of the ANC, went on to win the presidency of the country two weeks later.
31 March 2016: Nice pool, who paid for it?
South Africa's highest court ruled that Mr Zuma had violated the constitution when he failed to repay government money spent on his private home.
An anti-corruption body found he had spent $23m (£15m) on his rural home in Nkandla in the KwaZulu-Natal province, adding a swimming pool and amphitheatre. He later repaid the money.
Not for the first time, he faced calls to stand down.
Not for the last time, he didn't.
13 October 2017: Those old charges again
South Africa's Supreme Court of Appeal ruled that Mr Zuma must face 18 charges of corruption, fraud, racketeering and money laundering relating to the 1999 arms deal.
This all came about because the opposition Democratic Alliance brought a case before a Pretoria court, demanding that the president face charges. Mr Zuma lodged an appeal, but lost it.
On 16 March 2018 he found himself facing prosecution on 16 of the 18 corruption charges - for 783 instances of alleged wrongdoing.
13 December 2017: Two rulings, one bad day
First of all, a Pretoria court ordered Mr Zuma to set up a judicial inquiry into corruption claims against him and his associates, which he eventually did in January.
The inquiry was one of the recommendations made by the country's anti-corruption watchdog to curb state influence-peddling, which the president had tried to challenge.
Judge Dunstan Mlambo described Mr Zuma's attempt to challenge the rulings as "ill-advised" and an abuse of the judicial process.
Then, separately, a judge ruled the president had abused the judicial process by trying to block a report on corruption.
The figures that keep appearing in allegations against Mr Zuma are the wealthy Indian-born Gupta family, who are accused of using their relationship with the president to influence cabinet appointments and obtain lucrative government contracts.
The Guptas and Mr Zuma deny any wrongdoing but the allegations will not go away.
18 December 2017: Enter Mr Zuma's successor
In the race to succeed Mr Zuma after 10 years as head of the ANC, Cyril Ramaphosa - South Africa's deputy president - came out on top. He took over the party at a time it was losing popular support under Mr Zuma.
He campaigned as the anti-Zuma candidate, promising to target corruption. His victory put him in a position of strength over the president, and made him a leading candidate to succeed him.
On Tuesday, the ANC told Mr Zuma to step down or face a vote of no-confidence.
Then, on Wednesday, he said in a televised statement he said he was quitting with immediate effect but that he disagreed with the party's decision.
"No life should be lost in my name and also the ANC should never be divided in my name," he said.