JOHANNESBURG (AP) -- South African President Jacob Zuma resigned on Wednesday in a televised address to the nation, ending a turbulent tenure marred by corruption scandals that sapped the popularity of the ruling African National Congress and hurt one of Africa's biggest economies.
The resignation signaled an imminent end to a leadership crisis in South Africa and set the stage for Zuma to be replaced by Deputy President Cyril Ramaphosa, who has promised a robust campaign against corruption but will quickly face pressure to produce results in a country struggling with unemployment, economic inequity and other problems. Ahead of 2019 elections, Ramaphosa also has the tough task of rebuilding a ruling party whose moral stature has diminished since it took power at the end of white minority rule in 1994.
"I have therefore come to the decision to resign as president of the republic with immediate effect," said Zuma, who added that he took the decision even though he disagreed with the ruling party's demand that he quit immediately or face a motion of no confidence in the parliament on Thursday. Zuma, 75, had said he was willing to resign early from his second five-year term but wanted to stay in office for several more months.
"Of course, I must accept that if my party and my compatriots wish that I be removed from office, they must exercise that right and do so in the manner prescribed by the constitution," Zuma said.
The African National Congress welcomed the resignation, expressing gratitude for Zuma's "loyal service" during his nearly 10 years as president and encouraging party members to support Ramaphosa, now the country's acting president. By the end of the week, Ramaphosa is likely to be elected president by the ANC-dominated parliament and to give a state of the nation address that had been postponed during the political turmoil.
South Africa's biggest opposition party, the Democratic Alliance, said the ruling party must act against associates of Zuma who are also suspected of wrongdoing and mismanagement.
"Zuma built a deep system of corruption that has penetrated every part of the government and the criminal prosecution system," Democratic Alliance leader Mmusi Maimane said.
"Now the country looks to Cyril Ramaphosa to save us from a man that he and the ANC protected and supported. We must never allow this to happen again," said Maimane, who wants parliament to be dissolved so that early elections can be held.
Ramaphosa, a union leader during apartheid, was a key negotiator of the transition from white minority rule to democracy in the 1990s and later became a wealthy businessman. He replaced Zuma as leader of the ANC in December and has been consolidating his control, while also raising his international profile with a visit last month to the World Economic Forum in Davos, Switzerland.
On Wednesday morning, South African police raided the home of prominent business associates of Zuma who are accused of being at the center of corruption scandals that have infuriated the country. An elite police unit entered the compound of the Gupta family, which has been accused of using its connections to the president to influence Cabinet appointments and win state contracts.
Several people were arrested during police operations, South African media reported.
Both Zuma and the Guptas deny any wrongdoing, though legal challenges are looming. As the Gupta-linked investigation proceeds, Zuma also could face corruption charges tied to an arms deal two decades ago. South Africa's chief prosecutor is expected to make a decision on whether to prosecute Zuma on the old charges, which were reinstated last year after being thrown out in 2009.
In another scandal, South Africa's top court ruled in 2016 that Zuma violated the constitution following an investigation of multi-million-dollar upgrades to his private home using state funds. He paid back some of the money.
Still, Zuma, a former anti-apartheid activist who spent a decade at the Robben Island prison where Nelson Mandela was held, was popular among some South Africans for his personal warmth and populist policies.
In 2006, while being tried on charges of raping an HIV-positive family friend, Zuma was widely criticized after testifying he took a shower after extramarital sex to lower the risk of AIDS. He was acquitted of rape. But during his tenure, he called for earlier and expanded treatment for HIV-positive South Africans that helped to curb the death rate and urged his countrymen to get tested for HIV.
He presided over a South African triumph, the staging of the World Cup soccer tournament in 2010. He was also leader during the fatal shooting by police of several dozen protesters during labor unrest at a platinum mine in Marikana in 2012.
The former president was defiant in a television interview earlier Wednesday, saying he had done nothing wrong despite the ANC's demand for his resignation.
"I'm being victimized here," Zuma told state broadcaster SABC. He complained that Ramaphosa and other ANC leaders had not given him clear reasons about why he should go.
However, Zuma was affable when he arrived hours later at government offices to give his resignation speech.
"Why do you look serious? You can't even say, 'Good evening,'" a beaming Zuma said to weary journalists. "What's happening ... you are tired. We are working, aren't we?"
Follow Christopher Torchia on Twitter at