Led by the A.N.C. since the fall of apartheid, South Africa has been in limbo since the watershed election on May 29 when voters punished the ruling party for failing to address issues like skyrocketing unemployment, regular power outages and high rates of crime.

Over the next few days, a weakened A.N.C. will meet with opposition parties to carve out a deal to avoid a hung Parliament — one in which no party or coalition has a majority — in what Mr. Ramaphosa cast as an effort to bring stability to South Africa’s government.