JOHANNESBURG  Corruption charges against Jacob Zuma  the man almost certain to become South Africa’s president after elections later this month  were dropped Monday by prosecutors who said the case had been tainted by a tawdry, secret manipulation of the legal process from within their own ranks.

The case has deeply divided the country and struck at one of its core political questions: how to uphold the rule of law, a particular point of pride in this nascent democracy, when the nation is dominated by a single party and the party’s most influential figures vie for power.

South Africa has the continent’s largest economy, and while the decision to halt the prosecution may spare the country the discomfort of being led by a defendant in a corruption case, it did not resolve the underlying allegations that Mr. Zuma, the leader of the governing African National Congress, thrived off 783 payments over a decade’s time from a convicted briber.

“It’s very sad to see Africa’s major country now going down the same route by which corruption is easily excused by political authorities in other African countries,” said Laurence Cockcroft, a board member of the British chapter of Transparency International, an anticorruption group.