South Africa's ruling African National Congress, ANC, has selected Cyril Ramaphosa to succeed President Jacob Zuma as the party's leader.
The country's deputy president defeated former cabinet minister Nkosazana Dlamini-Zuma, Mr Zuma's ex-wife, after a marathon voting process.
Mr Ramaphosa is in a strong position to become president in 2019 polls.
The leadership battle caused fierce political infighting, raising fears the party may split before the election.
Mr Ramaphosa defeated Ms Dlamini-Zuma by 2,440 votes to 2,261, an ANC spokesperson announced.
The result triggered celebrations among party members.
Media reports earlier said the announcement had been delayed after Ms Dlamini-Zuma's camp had demanded a recount.
Mr Ramaphosa, 65, has spoken out strongly against state corruption and has the backing of the business community.
Ms Dlamini-Zuma, 68, had been critical of the enduring power of white-owned businesses and had pledged to tackle what she said was continued racial inequality.
Â