Last month, national prosecutors announced that corruption charges related to the arms deal would be reinstated against Mr. Zuma almost a decade after they were dropped.
After his court appearance, a pugnacious Mr. Zuma addressed thousands of supporters gathered near the courthouse. Flanked by religious leaders on a stage, Mr. Zuma, speaking only in the Zulu language, said he was being charged purely for political reasons.
He also talked about the struggle of black people worldwide and said that he had been targeted because he championed their economic empowerment.
Mr. Zuma faces 16 charges in the arms case, including corruption, fraud, racketeering and money laundering. Lawyers representing Mr. Zuma, who used legal maneuvers and the power of the presidency to avoid prosecution, had hewed to a strategy of delaying his trial as long as possible — what analysts have called the “Stalingrad strategy.”
Mr. Ramaphosa has said that, according to a longstanding agreement between party leaders and Mr. Zuma, who will turn 76 next week, the state will pay for his legal fees because the case relates to actions taken when he was in government.
Mr. Ramaphosa has said that, under the agreement, Mr. Zuma will have to reimburse the state if he eventually loses the case. But the deal effectively gives Mr. Zuma unlimited access to legal representation and raises the possibility that his case will be tied up in the courts for years.
Opposition parties are suing to force Mr. Zuma to pay back his legal fees, and to block the government from paying future ones. The government says it has already spent $1.3 million on Mr. Zuma’s legal defense, though opposition parties say the real amount is several times more.
The dispute over the fees represents a larger problem for the governing party, the African National Congress, or A.N.C., which must determine how strongly to back Mr. Zuma during his corruption trial. Mr. Ramaphosa and his allies have made fighting corruption a priority before national elections scheduled for 2019.
But they cannot afford to completely jettison Mr. Zuma, who remains popular among many A.N.C. followers, especially in his home province, KwaZulu-Natal. The former leader was recently deployed to KwaZulu-Natal, the province with the biggest number of A.N.C. supporters, to drum up support during a voter-registration drive.
At the same time, national party leaders explicitly discouraged members from wearing party uniforms while showing support for Mr. Zuma in his court appearance — a directive that was roundly defied on Friday. Supporters began gathering in Durban the night before, carrying A.N.C. flags and wearing party clothing.
Groups representing churches, women and youth were among the thousands of backers. Some held posters stating “100 percent behind Zuma.”
On Friday morning, Mr. Zuma and his supporters said prayers outside the court before he entered the building, flashing a thumbs-up gesture. At a recent church appearance, Mr. Zuma said: “People are free, but I am not. They are still after me.”
To his supporters, it was clear that “they” meant his political enemies. Mr. Zuma’s backers have long argued that, while other A.N.C. officials implicated in the arms deal were never charged, Mr. Zuma was singled out for political reasons.
Mr. Zuma was initially charged in 2007 while his greatest political rival, Thabo Mbeki, was president — charges that nearly derailed his ambitions to succeed Mr. Mbeki.
His supporters say he is again being singled out after losing a power struggle to Mr. Ramaphosa. The arms deal totaled 30 billion rand, or $2.5 billion at current exchange rates, and led to what is considered the single biggest instance of public corruption in the history of post-apartheid South Africa.
The purchase of naval vessels, submarines, fighter jets and other equipment from European nations — made by the government of Nelson Mandela in the mid-to-late 1990s — was meant to modernize the South African military.
Mr. Zuma was the leader of the A.N.C. and the nation’s deputy president when the arms deal was finalized in 1999. The chief prosecutor dropped the charges against him in 2009 after accusing his own officials of political interference.
That successfully resurrected Mr. Zuma’s bid to become president. But the main opposition party, the Democratic Alliance, challenged the decision to set aside the charges, and in 2016, it was judged “irrational” by the High Court — a ruling that the Supreme Court upheld last year.