JOHANNESBURG — In a humbling rebuke to President Jacob Zuma of South Africa, the African National Congress chose an anti-apartheid hero and business tycoon as its new leader on Monday, positioning him to become Mr. Zuma’s successor.

The new A.N.C. leader, Cyril Ramaphosa, was a protégé of Nelson Mandela, who had pushed unsuccessfully to name him as his successor in the late 1990s. After a long wait, he is now poised to lead a party and nation that have been deeply tarnished by Mr. Zuma’s eight-year rule.

After a fierce and tight race that exposed the stark divisions in the party, the A.N.C.’s 4,708 delegates voted by a margin of 179 ballots for Mr. Ramaphosa, 65, currently South Africa’s deputy president.

The vote also amounted to a rejection of Mr. Zuma, who had backed the other main contender, Nkosazana Dlamini-Zuma, a veteran politician and Mr. Zuma’s former wife.