(CNN) It was the moment Cyril Ramaphosa wanted in 1999. The former anti-apartheid activist was Nelson Mandela's favorite to succeed him as leader of the African National Congress and South African president, but the party overlooked him in a crushing blow to his political ambitions.

Nineteen years later, Ramaphosa finally has his chance -- but under very different circumstances.

He will take the reins from the scandal-hit Jacob Zuma, who resigned as President in disgrace on Wednesday after the ANC abandoned him over an astounding number of corruption allegations against him, deciding he could not possibly take the party through the 2019 general elections.

Following the Mandela years, Ramaphosa would have been tasked with taking a much-loved national hero's vision forward. Instead he must revive the national hero's legacy and save his party from ruin.

The ANC took a battering in local elections in 2016, mired in scandal, corruption and weak governance, and it hopes that in Ramaphosa, they have a leader to change the narrative for the 2019 vote.

Overlooked

Ramaphosa was Mandela's close aide and the ANC's chief negotiator in historic talks that brought the end of apartheid.

Despite Mandela's faith in him, he overlooked Ramaphosa and chose F.W. de Klerk as his first deputy in his historic 1994 election win.

Ramaphosa skipped Mandela's inauguration and didn't take a role in government, serving as an MP and chair of the constitutional assembly. He led the country in drafting its post-apartheid constitution.

Former President Nelson Mandela with Cyril Ramaphosa and Jacob Zuma.

At the end of his reign, Mandela wanted Ramaphosa to take over as ANC leader, but when the party chose Thabo Mbeki over him, Ramaphosa left and concentrated on his business efforts, building an empire in the '90s and 2000s', growing his popularity among South Africans outside the political sphere in the meantime.

In 2015, Forbes valued his net worth at $450 million , making him one of Africa's richest people. It was an enormous rise for a man who, like many of South Africa's anti-apartheid activists, came from humble beginnings. He was born in Johannesburg's Soweto township in 1952 to a retired police officer father and worked his way up from being a law student to a prominent public figure and a wealthy businessman.

His pedigree as an activist alongside Mandela and a trade unionist for miners made him highly likeable in a country that still struggles with stark inequality and a floundering economy.

Ramaphosa returned to the ANC in 2012 and dethroned Zuma as party leader in December last year, in what was the clear beginning of Zuma's demise.

Restoring Mandela's legacy

Ramaphosa has made cleaning up the ANC his top priority and told CNN's Christiane Amanpour in January that he wanted to return the party to Mandela's values of honesty, truth and integrity.

"My campaign to become leader of the ANC was pivoted on two things: Renewing the ANC and taking back to the values the were espoused and subscribed to by Nelson Mandela, Oliver Thambo and many other leaders," he said.

Cyril Ramaphosa speaks at Cape Town on February 11 from the same spot where Nelson Mandela addressed South Africans after being released from jail.

He also swore "to go deep into the roots of this corruption" and address historic allegations, sending a warning to Zuma that his resignation will not necessarily mean immunity.

He told CNN he would set up commission of inquiry to target the individuals and companies that "have captured our state institutions and were just stealing money left, right and center."

A police raid Wednesday on the home of the wealthy Gupta brothers over a corruption case linked to Zuma bore the hallmarks of Ramaphosa's pledge. Zuma and the Guptas deny allegations in the case, which involved benefits to assist poor black farmers.

Uphill battle

But Ramaphosa has had his own moments of scandal. He came under fire over dozens of deaths in shootings at a South African platinum mine in 2012. Ramaphosa at the time sat on the board of London-based Lonmin, the company that operated the Marikana site, in a particularly stinging case for a figure who rose to fame as a prominent union leader for miners.

Forty-four people were reported killed, including 34 miners, in two incidents at the mine. Seventy-eight others were injured.

He also faces more immediate challenges. ANC infighting has not disappeared. Ramaphosa won the party leadership by a very narrow margin, and old foes and analysts are still openly critical of him.

Moeletsi Mbeki, deputy chairman of the South African Institute for International Affairs and brother of former president Thabo Mbeki, said Ramaphosa was still part of the old guard that has sunk the ANC.

"(He) was part of the policies that have led to the decline of South Africa, so why do people think all of a sudden he's got some hidden secrets that he is going to put in place?" Moeletsi Mbeki said

But there is optimism that Ramaphosa will help bring prosperity to the country.

Since Ramaphosa's appointment as president of the ANC in December, the South African rand has gained 10% against the US dollar.

Rebooting the economy, however, won't be an easy task. Under Zuma, it sank into recession twice -- in 2009 and 2017 -- falling behind its emerging market peers. GDP growth has averaged less than 2% since 2009, one of the weakest rates in sub-Saharan Africa.