Up from Soweto township to become a leading anti-apartheid activist and then wealthy businessman, Cyril Ramaphosa has been a central figure in South Africa's tumultuous history before becoming the country's acting president.

Astute and articulate, the 65-year-old former deputy president marshalled the forces that brought scandal-swamped Jacob Zuma to resign late Wednesday and now faces the challenge of rejuvenating one of Africa's most powerful economies.

The ruling African National Congress "couldn't have got a better person to lead the country out of crisis," said William Gumede, professor at the school of governance at the University of the Witswatersrand.

"What's exciting about Ramaphosa is that he is a proven strategic thinker and actor," Gumede said. "As the leader of the National Union of Mineworkers in the 1980s, as the ANC's negotiator to end apartheid, as the chairman of the assembly writing the constitution, Ramaphosa has negotiated very difficult, complex problems and he has delivered solutions."

Ramaphosa became the leader of the ANC, Africa's oldest liberation movement, in December by narrowly defeating Zuma's ex-wife, Nkosazana Dlamini-Zuma. He quickly spoke out against the corruption that had weakened the ANC, which has been in power since the end of white minority rule in 1994, and sped up the momentum that led to Zuma's resignation.

Ramaphosa knew well what was needed to bring about a change of leadership as he's been a key ANC figure for decades, having served on its National Executive Committee for 26 years.

Born in Johannesburg's Soweto township in 1952, the son of a policeman, Ramaphosa became a student activist against the apartheid system of white minority rule. He was detained twice during that turbulent era, in 1974 when he was held in solitary confinement for 11 months for organizing rallies supporting Mozambique's nationalist movement and again in 1976 after the Soweto student uprising that focused the world's attention on apartheid's injustices.

After earning a law degree, Ramaphosa became the first general secretary of the National Union of Mineworkers in 1982. Under his leadership the union became South Africa's largest, growing in membership from 6,000 to 300,000. He led a weeks-long strike in the mining sector in 1987, making the union a potent force in the anti-apartheid struggle.

When Nelson Mandela was released from prison in 1990, Ramaphosa stood beside him to hold the microphone as the anti-apartheid leader gave his first public speech. In 1991, Ramaphosa was appointed the ANC's secretary general when South Africa's ban on the party was lifted.

During the country's shift to democracy, Ramaphosa was the ANC's chief negotiator in the multi-party talks that achieved a peaceful transition from apartheid to democracy. He then chaired the assembly that drafted South Africa's much-lauded constitution. Ramaphosa was elected to parliament in the country's first majority-rule elections in 1994 that saw Mandela become president.

Mandela reportedly favored Ramaphosa to take over for him as ANC leader, but in 1997 the party instead chose Thabo Mbeki, who later succeeded Mandela as president.

Ramaphosa left political life and became one of South Africa's most prominent businessmen, turning his union connections into ventures that at times have been controversial. Many South Africans remember that he was a board member of the Lonmin mining group at the time of the Marikana killings in 2012, when police shot dead 34 striking mine workers.

Seen as an ally of Zuma, Ramaphosa in 2014 was appointed deputy president of the country.

Despite being part of Zuma's government, Ramaphosa became an increasingly outspoken critic of the corruption scandals surrounding the president. He vowed to steer South Africa from the turmoil that has hurt the economy and briefly sent it into recession last year.

Still, as one of the country's wealthiest citizens, there is a wide gulf between Ramaphosa and the vast majority of the people of South Africa, a mineral-rich country with one of the world's highest rates of inequality and unemployment hovering close to 30 percent.

He also faces steep challenges with national elections in 2019 as the ANC saw its worst showing at the polls in 2016, losing the key municipalities including Johannesburg and the capital, Pretoria.

"Cyril Ramaphosa inherits an alarming mess from Jacob Zuma," said Ben Payton, head of Africa research for Verisk Maplecroft. Restoring confidence in the troubled mining sector, ending the corruption around state-owned enterprises and winning over Zuma's supporters within the ANC should be among his top priorities, Payton said.

Ramaphosa, he said, will be "walking a tightrope, balancing the competing priorities of holding his party together while avoiding economic disaster."