Ramaphosa led talks to end white minority rule / © POOL/AFP/File
Over the course of his 66 years, Cyril Ramaphosa has experienced the poverty of Soweto, jail for fighting apartheid, trade union activism, fabulous wealth -- and now elected leadership of his country.
Ramaphosa, who became president last year through internal ANC politics, won a popular mandate in elections on May 8, opening the latest chapter of a career intertwined with the birth of modern South Africa.
On Wednesday he was chosen as national president by lawmakers after the African National Congress party, which he leads, won 230 out of 400 seats in parliament in the national election.
When Nelson Mandela walked out of jail in 1990, a youthful Ramaphosa was standing beside him as the world looked on.
It soon became clear that Mandela saw him as a protege, and Ramaphosa went on to lead talks to end white-minority rule and to help write the new constitution.
But after missing out on becoming Mandela's successor as president, he instead became a hugely wealthy businessman through stakes in McDonalds, Coca-Cola and in the mining and telecommunications sectors.
In 2012, his image was badly tarnished when police killed 34 striking workers at the Marikana platinum mine, operated by London-listed Lonmin, where he was then a non-executive director.
Ramaphosa had called for a crackdown on the strikers, whom he accused of "dastardly criminal" behaviour.
He returned to politics to become Jacob Zuma's vice president in 2014, often drawing criticism for failing to speak out against corruption and government mismanagement.
Renowned for his patience and strategic thinking, Ramaphosa narrowly beat off pro-Zuma rivals to take over the leadership of the ANC in 2017 and then claim the presidency when Zuma was forced out last year.
Ramaphosa, who is relaxed and quietly spoken in public, enjoys a broad support base that crosses some of South Africa's sharp racial and class divides.
But he still faces strong opposition from factions within the ANC, and his renowned guile and backroom skills will be needed in the years ahead.
"We have made mistakes but we have been sorry about those mistakes and we are saying our people should reinvest their confidence in us," Ramaphosa said when he voted, delivering a rebuke to the Zuma era of ANC government.
- 'New generation' -
Ramaphosa was born on November 17, 1952 in Johannesburg's Soweto township -- a centre of the anti-apartheid struggle -- to a police sergeant and a domestic worker.
He took up activism while studying law in the 1970s, and spent 11 months in solitary confinement.
Cyril Ramaphosa / © AFP/File
Mandela once described Ramaphosa as one of the most gifted leaders of the "new generation", the young campaigners who filled the void left by their jailed elders.
After studying, Ramaphosa turned to trade unionism -- one of the few legal ways of protesting against the white-minority regime.
He founded the National Union of Mineworkers (NUM) in 1982 which grew to have 300,000 members and led massive strikes in 1987 that shook the foundations of white rule.
Ramaphosa's destiny seemed pre-ordained.
But in 1999, his hopes of winning the top job were dashed when he failed to clinch the nomination of the ruling ANC to succeed Mandela.
Ramaphosa bowed out of politics and became one of the richest businessmen on the continent -- reaching number 42 on the Forbes list of Africa's wealthiest people in 2015 with a net worth of $450 million (400 million euros).
He developed an expensive hobby as a breeder of rare cattle, and owns several farms.
Ramaphosa returned to the political fray in 2012 when he was elected to the ANC's number two post. Two years later, he became deputy president of the nation.
Seen as a pro-business moderate, Ramaphosa has seldom been the target of direct graft accusations himself -- but his political ambivalence and vast wealth have led to criticism.
Mmusi Maimane, leader of the main opposition Democratic Alliance party, said Ramaphosa's acquiescence made him "at best a silent deputy president, and at worst a complicit one".
Ramaphosa has four children with his second wife Tshepo Motsepe, a doctor, who is the sister of fellow tycoon Patrice Motsepe.
Ramaphosa's mastery of political strategy came to a climax last year. He gradually sidelined Zuma's backers and finally forced his resignation.
"Ramaphosa has no association with any of the corruption scandals that have plagued South Africa," wrote his biographer Ray Hartley in "The Man Who Would Be King".
"But the years he spent at Zuma's side, playing the 'inside game' suggest he is more comfortable as a powerful insider than as a radical reformer."