Demonstrators raise their fists in the air during a protest in Rio de Janeiro.

Photographer: Dado Galdieri/Bloomberg

Americans who long for Washington’s political swamp to be drained must look wistfully upon Latin America.

Brazil’s former President Luiz Inácio Lula da Silva last week was sentenced to almost 10 years in prison for taking kickbacks. One day later, a former Peruvian head of state went to prison in a money-laundering probe. Meanwhile, in Argentina, the congress was discussing tougher anti-graft measures.

U.S. President Donald Trump came to power promising to end self-dealing and “drain the swamp” in a capital that legend holds was constructed on a malarial wetland. He quickly found himself accused of using the presidency to swell the coffers of his family business, and installed his daughter and son-in-law in the White House.

Former Brazilian President Luiz Inácio Lula da Silva.

Photographer: Miguel Schincariol/AFP via Getty Images

In Latin America, however, an anticorruption movement is dealing with more clear-cut evidence of graft that reaches society’s highest echelons.

“There’s hope in justice,” Cesar Rodrigues, a 31-year-old Brasilia business administrator, said after Lula was sentenced. “The politicians thought they were above the law.”

During the commodities boom, many Latin American economies soared and some members of the ruling classes feasted on the spoils. With the era’s end, living standards collapsed and with them the approval ratings of leaders, who suddenly looked vulnerable. Fast-forward to 2017: In Brazil, Argentina, Peru, Panama and Guatemala, current or former heads of state have been probed, sued or jailed.

“When things were going good, there was little concern with corruption,” said Michael Shifter, president of Inter-American Dialogue, a Washington-based think tank. “A rising middle class, shifting attitudes, new laws and social media all certainly played a role in pushing for more justice.”

The spread of internet technology contributed to the increase in prosecutions and the rising tide of protest, said Luis Moreno-Ocampo, an Argentina-born New York lawyer who is former president of Transparency International’s Latin America and Caribbean office.

“There’s more demand and there’s more ability to get information,” Moreno-Ocampo said. “South America is showing that democracy is working.”

Ollanta Humala, Peru’s former president, second from right, and his wife, Nadine Heredia, center, are escorted to sentencing in Lima on July 13.

Photographer: Miguel Schincariol/AFP via Getty Images

The list of former and current heads of state in the hands of justice is long:

Brazil’s Lula is the biggest figure charged in the three-year Car Wash probe, which centered on kickbacks involving contracts at the state-run oil company. Once the nation’s most popular politician, he was also the opinion poll favorite for the 2018 elections.

In Peru, Ollanta Humala, whose term ended in July 2016, surrendered at a Lima courthouse last week for 18 months of preventive detention after a judge found it likely he and his wife laundered money. In another case, an arrest warrant was issued in February for his predecessor, Alejandro Toledo, on bribe allegations.

To the south, in Argentina, former President Cristina Fernandez de Kirchner faces trial on fraud and money-laundering charges.

Panama’s ex-President Ricardo Martinelli is in a U.S. jail awaiting extradition on charges he tapped phones and other conversations with a surveillance system financed with public funds.

That doesn’t even take into account swarms of lower-level politicos, businessmen and billionaires caught up in investigations around the region. The cases, incomplete and idiosyncratic as they are, show a common concern for the rule of law, said Jose Ugaz, chairman of Transparency International.

“Corruption reached the highest level of the private sector and the political class in each country, and the justice system isn’t holding back or guaranteeing impunity,” Ugaz said from Lima. “We’ll have to see the final results, but at this stage, the fact they are investigating and taking measures is a very encouraging sign.”

The anticorruption efforts aren’t limited to courtrooms. Argentina’s senate is debating a law that would make entire companies rather than individuals responsible in cases of corruption. The law would let prosecutors cast a wider net and could make it easier for top executives to face charges.

Demonstrators hold up a sign that reads “Out Temer” during a protest in Rio de Janeiro.

Photographer: Dado Galdieri/Bloomberg

Still, Latin America has a tortured history of colonialism, repression and graft that has left many nations with weaker democratic institutions. Arrests alone won’t establish clean politics, without a new generation of honest and transparent politicians, said Shifter of Inter-American Dialogue.

“Sending people to court is good, but you need to fill that void, you need to have people who come to politics with credibility, and that we really haven’t seen,” he said.

Many citizens remain skeptical.

“The wealthy continue to benefit,” said Eber de Azevedo, a 32-year-old doorman at an office complex in Brasilia. “It seems their crimes pay off.”

In the U.S., the yearning to fight perceived corruption remains similarly unfulfilled, even after it propelled Trump to office. For Trump’s critics, he personifies the problem he purported to solve. He has refused to fully distance himself from his real estate business, which is based on the power of his personal brand. His sons, who are running it in his absence, have announced expansion plans.

While minority Democrats in Congress protest loudly—some have filed articles of impeachment—most Republicans have been unswayed, and Trump has said voters knew they were electing a businessman.

Brazilian President Michel Temer.

Photographer: ​Evaristo Sa/AFP via Getty Images

In any event, popular pressure to truly clean house can take years to gain critical momentum. In Brazil, the issue became impossible to ignore after the release of audiotapes of meetings that seemed to reveal President Michel Temer discussed hush money with a businessman. One of Temer’s closest aides was videotaped leaving a restaurant with a suitcase of money, images broadcast on national television. Now, lawmakers may permit an unprecedented effort to prosecute a sitting chief executive.

Temer last month was charged with corruption after allegations he received the 500,000 reais ($151,000) in the suitcase from a meat-packing company. Whether he is put on trial depends on congress, where he still holds a significant sway—and where many legislators also face corruption charges. The lower house will decide whether he is tried before the nation’s top court.

Such a prosecution would be a watershed not just for Brazil, but for a region where the rule of law has had a tenuous grip. Whatever the outcome, the continent is set firmly on a path to better governance, Ugaz said.

“This is the tip of the iceberg,” he said. “It’s just starting.” —With Luisa Marini