A CAR slams into a tree at speed, and is crushed. Inside, the Romanian police find the body of the chief executive of a company that makes detergents for hospitals—one under investigation for watering down its products and leaving patients to die from drug-resistant infections. The Hexi Pharma scandal (see article) sounds like something out of “The Third Man”. For many foreigners, it confirms Romania’s reputation as a kleptocracy riddled with malfeasance and graft.

Romania is certainly rotten. But the Hexi Pharma affair is evidence of how much the country is doing to tackle corruption. After investigative journalists exposed the case in late April, it was quickly taken up by the judiciary. This has become much more independent under pressure from the European Union, which Romania joined in 2007. The new general prosecutor, appointed in April by a president elected on an anti-corruption platform, is pursuing Hexi Pharma zealously. Laura Codruta Kovesi, the dauntless head of the country’s anti-corruption directorate, says her agency is also investigating. Last year it prosecuted over 1,250 officials and helped force the prime minister from power. At last month’s global corruption-fighting summit in London, Ms Kovesi was treated as if she were a rock star.

It is a common paradox: the world often becomes aware of corruption when someone is doing something about it. That leads people to conclude that things are getting worse when they are, in fact, getting better. The incentives for countries can thus be perverse. Investors long shrugged off the graft that permeated Brazil’s political system. Then, in 2014, crusading prosecutors revealed that the state-owned oil company, Petrobras, had funnelled hundreds of millions of dollars to officials and parties in exchange for contracts. The next year Brazil’s score on the Corruption Perceptions Index compiled by Transparency International, a global watchdog, fell by five points.

Guatemala has suffered a similar fate. Since 2008 the country has hosted a pioneering UN-backed independent prosecuting agency known as CICIG. Last year it uncovered graft at the customs agency and brought down the president and vice-president. Yet in 2015 the country’s score on Transparency International’s index got worse. Dan Hough, a corruption expert at Sussex University, notes that Britain’s score on the Transparency International index declined after the parliamentary expenses scandal of 2009, though the excesses had been taking place for decades—and, in the scheme of things, Britain was not especially venal. It was the exposure, not the activity, that created the perception of corruption.

Make an honest country of them

The tendency to see countries as dirtier when they start to clean up will not surprise students of British or American history. The impression that both countries were unusually sleazy in the late 1800s is largely due to the rise of reform and progressive movements dedicated to making politics honest. The question is whether countries such as Romania, Brazil, Guatemala or China will be able to follow the same path.

They may not. The Orange revolution in Ukraine and the mani pulite (clean hands) prosecutions in Italy failed to sanitise those countries’ politics. Still, if a country like Romania is embroiled in scandals, voters and investors should applaud, not despair. When crooks make the front page, it is often because someone honest has put them there.