Activists hold a rally supporting the KPK at its headquarters in Jakarta in January 2015.Darren Whiteside / Reuters

JAKARTA, Indonesia—Political corruption is a fact of life in many countries, and it can be fiendishly difficult to control. The worst offenders, almost by definition, are some of the most powerful figures in their community. Many of the police officers, prosecutors, and judges who might hold them in check owe their job to the very same individuals. It’s a thorny problem, even for countries with well-developed public institutions.

So what does an anti-corruption drive look like when virtually everybody’s on the take?

For decades in Indonesia, the corruption was like the humidity: always there. In Transparency International’s initial ranking, in 1995, of nations’ perceived corruption, Indonesia came in dead last. Last year, it clocked in at 89 out of 180: the first time it ever broke into the top half of the chart. Hardly Denmark (which was first)—but no longer Somalia (last). What lessons can Indonesia teach the rest of us?

When Suharto, the longtime dictator, fell from power in 1998, he left a legacy of corruption that permeated every level of society. He is estimated to have pilfered up to $35 billion during his three decades in power—earning the title of world’s most corrupt leader. His example filtered down from ministers doling out project funds in gilded offices to traffic cops hustling payoffs on dusty street corners. Police seldom investigated even the clearest cases of graft, and prosecutors rarely took even the most winnable cases to court.

Then, in 2002, the country established the Corruption Eradication Commission, which goes by the local acronym, KPK. The new body would run parallel to the police and the attorney general’s office, and was entrusted with the power to investigate and prosecute any public official for any type of corruption.

While much of its employees’ work involves poring over dry balance sheets, the KPK has in-your-face swag. It is housed in its own building, painted boldly in the colors of the nation’s flag: red as blood, white as truth. Inside, the vibe is that of a tech start-up, and the organization’s record seems as sterling as that of a Silicon Valley unicorn—a conviction rate of nearly 100 percent, and over 1,000 corrupt public officials sentenced.

The job of bringing ne’er-do-wells to trial falls to people such as Ferdian Nugroho, a soft-spoken prosecutor from a backwater town in Central Java, who got bored trying two-bit hoodlums and longed for a greater challenge. In a bigger pond he was able to catch bigger fish: Several years after joining the KPK, he netted a shark named Fuad Amin Imron, the regent (an office midway between mayor and governor) of a district on the island of Madura, who’d gobbled up more than $42 million.

“Cash was stuffed everywhere,” Nugroho told me. “Suitcase after suitcase of it. In the cupboard, under the bed.” But that was just a fraction of the take. All those sacks of bills added up to $200,000, but further investigation uncovered $28 million tied up in real estate and another $14 million in laundered bank accounts. Fuad Amin was the grandson of one of the most revered Muslim scholars in the nation—his grandfather was the spiritual mentor of the founder of the world’s largest Islamic organization. “People respected him,” Nugroho said. “And also, they feared him.”

Throughout Indonesia, Madura has a reputation similar to that of Sicily: The people there are blunt, straightforward—and not averse to settling disputes with violence. One NGO worker who started poking around the regent’s business was shot in 2015. The would-be assassin happened to be from the same political party as the regent, and received a sentence of only six months in prison, according to Nugroho.

For a decade, everyone in Fuad Amin’s district knew what he was up to, and nobody said a word to the central authorities. Only after the regent retired (bestowing his office, naturally, to his son), did someone finally find the courage to phone the KPK hotline. Fuad Amin was sentenced in 2017 to 13 years in prison, and his assets were seized.

Despite the successes, anti-corruption work remains dangerous. On a spring day in 2017, the KPK investigator Novel Baswedan was walking home from a mosque when a thug on a motorbike tossed acid in his face. Baswedan survived, but was blinded in one eye. Outside KPK headquarters, a billboard shows a photo of his maimed face and counts the days, hours, minutes, and seconds that have gone by without his attacker being brought to justice. The “days” digits recently blinked to 780. The message is clear: The KPK may not be able to guarantee its staff’s safety, but it won’t let their sacrifices be ignored.

What else can the KPK teach? Nugroho pointed to three factors that make his organization more effective than many others. First, its independence. “Nobody interferes with us,” he said. “I have never once been told to back off a case.” Second, its extraordinary powers. “We can wiretap any subject we wish, without a judge’s permission,” he said proudly. “Even your FBI can’t do that!” The rationale for such freedom is that Indonesia’s judiciary is itself notoriously corrupt; judges come under the aegis of KPK prosecution.

The third element is the KPK’s willingness to go after targets across the political spectrum. Indonesia has 10 parties large enough to win seats in the national legislature, and minor ones almost beyond counting. Most of the big ones have come onto the KPK’s radar. The degree of the agency’s nonpartisanship is contested, but even one former elected official I spoke with, who requested anonymity because he is currently serving prison time following a KPK investigation, grudgingly endorsed its reputation for fairness.

For an organization charged with combatting corruption in a country where it is widespread, though, the KPK hasn’t always fulfilled that obligation. In 2010, for example, its chairman was sentenced to 18 years in prison for ordering the murder of a business associate who’d been blackmailing him over an extramarital affair with a golf caddy.

Moreover, a 100 percent conviction rate raises a host of questions. Are the trials and investigations truly fair? The former elected official said that his weren’t, that he was set up by Indonesia’s intelligence agency, and that he was convicted after refusing the judge’s demand for a bribe. Does the commission have a perfect record only because it goes after the lowest-hanging fruit? Perhaps it is ignoring juicier targets farther up the tree. Part of Indonesia’s struggle with stemming corruption lies in the fact that Suharto never served a day in prison (he died in 2008). It's hard to justify a crackdown on lower-level bureaucrats while leaving the kingpins untouched.

The KPK’s greatest contribution, though, may be in merely bringing some measure of accountability, however imperfect. During the years that the agency has been operating, Indonesia has climbed annually on Transparency International’s ranking, from the very bottom to the lowest fifth and so on, before finally reaching the midpoint of the index.

In the United States today, very few high-ranking officials are ever jailed for corruption. The occasional elected representative, out of hundreds serving at any time, may wind up in Club Fed, but only if he is exceptionally venal and exceptionally careless. Anyone higher up the food chain can reasonably expect to receive nothing more than a fine and probation. This is not because American politics are unusually clean—it’s hard to argue that the current U.S. administration has been a paragon of righteousness, and, indeed, the United States ranks only 22nd in Transparency International’s index.

The most vexing challenge is drawing a sharp line between political corruption and politics as usual. In the course of researching this article, I found that two of my personal acquaintances here in Indonesia had been arrested, tried, and sentenced to prison time (which they served) in cases brought by the KPK. I don’t hang out with an atypically corrupt set of degenerates. Or, at least I don’t think I do. But in a society where virtually everybody has paid off somebody for something—a traffic violation, a building permit—who can tell?

The United States isn’t Indonesia by a long shot. But that should not be grounds for complacency. When political corruption is tolerated, it can quickly become normalized. The KPK, with its warrantless wiretaps and employment of convicted criminals, doesn’t offer a perfect handbook for virtue’s custodians. It does, however, provide vivid evidence of the measures available to help take on dirty politics.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.