JOHANNESBURG — It is, in South Africa’s political parlance, the season of the two centers of power.

In December, Cyril Ramaphosa was elected leader of the African National Congress and, given the party’s pre-eminence, he immediately became the nation’s president in waiting.

That left President Jacob Zuma — the former leader of the party who had backed Mr. Ramaphosa’s rival — still in charge of the government, possibly until the next national elections in mid-2019.

And now the single question driving the politics of South Africa has become one of timing. When will Mr. Zuma cease to be South Africa’s president?

As that question hangs in the air, the people around the two men have to decide which one to back, how strongly and when. It is as if an older sun has lost its gravitational pull to a newer one — and the orbiting planets, in some confusion, have been realigning themselves.

Under South Africa’s Constitution, the Parliament elects the president. That leaves the A.N.C., which dominates the legislative body, with two options if it wants to recall Mr. Zuma before the end of his term in 2019: Order him to step down and avoid bringing the matter to Parliament; or allow the anti-Zuma camp to join forces with opposition lawmakers to impeach him.

Mr. Ramaphosa’s allies are pressing Mr. Zuma — whose corruption-plagued eight years in office have damaged South Africa’s economy and reputation — to step down as early as possible. His successor, they argue, should be the one to deliver the state of the nation address, scheduled for Thursday, to give the nation a badly needed reset.

Among Mr. Zuma’s supporters, the reaction has been more complicated. A few high-profile former allies of the president, including the finance and police ministers, have leapt into Mr. Ramaphosa’s camp with head-spinning speed.

Others have dug in, clearly hoping to extend Mr. Zuma’s presidency — and their own power — as long as they can.

The vast majority of officials, though, appear open to negotiations with Mr. Ramaphosa, who has made his career — in labor, business and politics — by being the best negotiator in the room.

Mr. Ramaphosa, known for always keeping in mind the political long game, has been carefully nudging Mr. Zuma, even as the new leader of the A.N.C. seeks to unite a fractured party behind him. The matter of Mr. Zuma’s departure, he told the South African news media, should be approached with “maturity” and “decorum.”

“We should never do it in a way that is going to humiliate President Zuma,” said Mr. Ramaphosa, who has been the nation’s deputy president since 2014.

Even as negotiations over Mr. Zuma’s departure continue, power has begun to shift in real ways. Mr. Ramaphosa led the nation’s delegation to the World Economic Forum in Davos, Switzerland, effectively acting as South Africa’s leader on the world stage.

More significantly, there have been domestic developments that would have been highly unlikely before Mr. Ramaphosa’s election as party leader in December.

At some state enterprises, which have been the source of much public corruption in recent years, Mr. Zuma’s allies have been quickly replaced by respected officials chosen by Mr. Ramaphosa. State prosecutors have begun investigating some senior political allies of the president, along with the Guptas, a powerful family with close business ties with Mr. Zuma’s relatives and his inner circle.

“It does reflect the changing of the guard at the A.N.C. — it has freed up some of the good pockets in some of the law-enforcement agencies to start acting,” said David Lewis, the executive director of Corruption Watch, a nonprofit organization, adding that state prosecutors and police investigators tend to be heavily influenced by politics in South Africa.

Mr. Zuma’s fate now lies with the A.N.C.’s top leadership, which remains divided, with an edge in Mr. Ramaphosa’s favor, political analysts said.

While Mr. Zuma’s allies initially kept quiet, some have begun pushing back in recent days, including his two supporters among the party’s half-dozen most senior leaders. Jessie Duarte, the deputy secretary general, said that Mr. Zuma would serve out his full term until elections next year.

The secretary general, Ace Magashule, denied news reports that the party’s leaders had decided to remove Mr. Zuma, adding of Mr. Ramaphosa’s allies, “It’s only factional leaders who want to be populist, the ones who are loved by the papers, the ones who don’t know the A.N.C., who are making noise outside.”

Mr. Magashule, who is also the leader of Free State Province, spoke a few days after police raided his office there in search of documents related to a Gupta-linked dairy farm project thought to have been used to misappropriate public funds.

He spoke at a rally in Mr. Zuma’s home province, KwaZulu-Natal, where loyalists voiced strong support. The province, which is the A.N.C.’s biggest source of votes nationally, remains one of Mr. Zuma’s strongest cards in his negotiations with Mr. Ramaphosa — as does the party’s youth league, which held the rally.

Mandla Shange, the youth league’s spokesman in KwaZulu-Natal, dismissed any talk of removing Mr. Zuma.

“That’s not a decision you just take,” he said in an interview. “There must be a transition plan between President Zuma and President Ramaphosa. That is why President Zuma’s term of office ends in 2019, so we expect President Zuma to continue to be president until 2019.”

But analysts say that because of the survival instinct of the A.N.C., which has governed South Africa since the end of apartheid in 1994, it is unlikely that Mr. Zuma will be allowed to serve out of his full term. The longer Mr. Zuma stays in power, the harder it will be for Mr. Ramaphosa to rebuild the party’s brand before next year’s elections.

“Remember, all they want at the end of the day is to make sure that the A.N.C. can win elections,” said Lukhona Mnguni, a political scientist at the University of KwaZulu-Natal. “It’s not that they want Zuma gone because of misgovernance. They want him gone so that they, as A.N.C. members, can remain at the top of South African politics. It’s in their best interest that he goes, but they have to manage the timing and any fallout.”

If Mr. Zuma hangs on to power, he risks facing impeachment in Parliament after a recent ruling by the nation’s highest court. The A.N.C., which holds more than 60 percent of parliamentary seats, would face two unattractive options: defending a deeply unpopular president or impeaching a leader it has steadfastly supported for the past eight years.

Mr. Zuma also faces other embarrassing legal challenges, including 783 counts of corruption related to an arms deal before he became president in the 1990s when he was a top party leader. He has successfully avoided prosecution over the years, and he argued again last week that he should not be indicted. State prosecutors are expected to make a decision later this month.

How and when Mr. Zuma leaves office, experts say, will influence how much Mr. Ramaphosa can reinvent the A.N.C. before next year’s elections.

Mr. Ramaphosa and his allies enjoy strong support among urban, middle-class black voters who, disillusioned by Mr. Zuma’s presidency and with the party’s transformation from Nelson Mandela’s heroic liberation movement to an organization associated with corruption and mismanagement, began abandoning the A.N.C. in recent years. In local elections in 2016, the A.N.C. lost control of most of the country’s major cities as those disenchanted voters backed the opposition or stayed home. Mr. Ramaphosa needs to win them back.

“The A.N.C.’s continued, foolhardy inability to remove President Zuma clearly indicates that the A.N.C. cannot be trusted and cannot be relied upon to bring about the changes promised by its newly elected leadership,” Bantu Holomisa, leader of the opposition United Democratic Movement, said in a news conference.

In one suburb that turned against the A.N.C. in 2016, Danny Zitha, a retired high school teacher, was so angry with the party that he vowed never to back it again. But recent changes in the A.N.C. have softened his position.

He was disappointed that the A.N.C.’s top leaders had not tried to remove Mr. Zuma at their first meeting in January. But he was impressed by prosecutors moving against some of Mr. Zuma’s political and business allies, and the thought of returning to the A.N.C. was no longer inconceivable to him.

“Once Ramaphosa gets rid of Zuma and all those corrupt guys are taken to task, perhaps then I can have another way of thinking — but only then,” Mr. Zitha said. “Zuma must be toothless. But right now he still has teeth. He can chew whatever he wants to chew.”