Jacob Zuma became South Africa's president in 2009 amid suspicions of corruption. After nine years in office, and many more allegations, he resigned Wednesday after his own African National Congress party told him it was time to go.
Zuma, 75, was a political survivor. But he never escaped the taint of corruption, and his tenure marked the rockiest period in South Africa's post-apartheid era.
"There's nothing I've done wrong," he said in a defiant interview Wednesday with the South African Broadcasting Corp. "What is the problem? I don't understand. ... I don't think it is fair."
But the African National Congress made clear it would oppose him in a no-confidence vote in Parliament. So Zuma announced his resignation in a televised broadcast Wednesday night.
"No life should be lost in my name," he said. "The ANC should never be divided in my name. I have therefore come to the decision to resign as president."
During Zuma's presidency, a country that has regarded itself as an African success story and an exemplar of democracy has been struggling with political turmoil, endemic corruption and a weak economy — the same issues that afflict so many of its neighbors.
His ouster "has all happened because President Zuma has, many people say, brought the ANC into disrepute," said NPR Africa correspondent Ofeibea Quist-Arcton. "It is hugely humiliating for Zuma, who has been an ANC stalwart since he was a very young man."
If South Africans are looking for a silver lining in this political drama, they may find consolation in knowing that Zuma has become the second president to be removed through a peaceful political process.
Before Zuma, Thabo Mbeki was also forced out as president by the ANC, in 2008, with less than a year left in his term.
And consider this: On a continent where many presidents rule for decades, no South African leader in the post-apartheid period has served out the two five-year terms allotted by the constitution.
As a national icon, Nelson Mandela could have easily won a second presidential term in 1999, but at age 80, he decided it was time to step down. He died in 2013.
Mandela's African National Congress has been in power ever since the end of apartheid in 1994. But its support has been slipping and the ANC is expected to face its most serious challenge in national elections next year.
Zuma has "become a liability to the ANC," Quist-Arcton noted. "They're going to elections next year, and they have to have him out."
Those who called for Zuma to step aside included The Nelson Mandela Foundation.
"President Zuma has abused the trust of South Africans. He must go sooner rather than later," the foundation said in a statement last week.
Corruption at all levels in South Africa was a serious problem before Zuma's presidency. But there's a broad consensus it significantly worsened under him.
The country's highest court ruled in 2016 that Zuma used government money to upgrade his lavish personal home.
Zuma's advisers argued that the swimming pool was a matter of national security: Firefighters could tap it if a blaze broke out. After losing in court, Zuma eventually agreed to pay back about $500,000 for various upgrades at the home.
Zuma's critics often pointed to his close relationship with the wealthy Gupta family, which has received huge government contracts. Watchdog groups have accused Zuma of influence peddling, a charge Zuma and the Guptas have denied.
In the latest twist, South African police raided the Gupta family compound in Johannesburg on Wednesday, blocking off the street and declaring it a "crime scene."
A new leader
The ANC has made clear that Zuma's replacement will be Cyril Ramaphosa, who will move up from deputy president in advance of next year's ballot.
Ramaphosa was named ANC leader in December — Zuma wanted his ex-wife to get the job — and at 65 he may be the last South African leader who made his name as an anti-apartheid activist.
Ramaphosa led the black mineworkers' union during the 1980s. He was the ANC's main negotiator with the white government over the terms of ending apartheid.
But after the transition, Ramaphosa lost out in internal ANC battles to succeed Mandela, and he has spent much of the past two decades amassing a fortune as a businessman.
Supporters consider him an experienced, capable manager with a low-key style.
However, critics say he has lost touch with poor blacks and is more in tune with the country's wealthy elite. He has never been a charismatic speaker and doesn't inspire younger South Africans who know him mostly, or entirely, in the post-apartheid years.
South Africa has developed a black middle class and can boast the most advanced and diverse economy on the continent. Yet millions of impoverished blacks are still waiting for a leadership that can deliver on its promises.
NPR's Greg Myre reported from South Africa from 1987-93 and has returned many times since.