THE centre-left Social Democratic Party (PSD) entered Romania’s parliamentary election on December 11th with what, in most countries, would be considered a handicap. Its leader, Liviu Dragnea, was convicted in 2015 of attempting electoral fraud three years earlier. But many see Mr Dragnea’s conviction as politically motivated, and in Romania many parties are tainted by corruption. The PSD came first by a wide margin, winning 46% of the vote, well ahead of the centre-right National Liberal Party (PNL), which took just 20%.

The PSD’s victory has led to worries that Romania’s anti-corruption drive, a model for the region, may slow down. The country’s independent National Anticorruption Directorate (DNA) prosecutes more than 1,000 people a year, and convicts most of them. Mr Dragnea is not the only PSD leader to fall foul of the DNA: a year ago Victor Ponta, then the prime minister, was forced to resign amid mass demonstrations. The DNA had charged him with forgery and conflicts of interest, and anger peaked after a blaze killed 64 people at a nightclub in Bucharest where inadequate fire-safety measures were blamed on graft.

Romania’s president, Klaus Iohannis, has vowed not to appoint anyone convicted of corruption as prime minister. That could rule out Mr Dragnea, but several other PSD figures have been mooted. Any of them would probably form a coalition with the Liberal Democratic Alliance (ALDE), a small party that has attacked the anti-corruption agency and called for the resignation of its straight-arrow director, Laura Codruta Kovesi. And some see the victory of the PSD, which promised to raise the minimum wage and increase pension payments, as a sign that anger at cronyism is giving way to economic concerns. “It’s a real test” of Romania’s legislation, institutions and political parties, said Laura Stefan, an analyst at the Expert Forum, a think-tank in Bucharest.

Anti-corruption efforts have earned Romania praise from the European Commission, which reviews the country’s governance each year as a condition of its accession to the European Union in 2007. On the corruption-perceptions index compiled by Transparency International, a watchdog, Romania improved its rank from 69th in the world in 2014 to 58th in 2015. Several other countries in the region have been getting dirtier. According to the World Bank, Hungary has grown more corrupt under its prime minister, Viktor Orban, who has used cronyism to entrench his Fidesz party. Bosnia, Moldova and Serbia have stagnated or worsened. And there are worries about Poland, where the Law and Justice government embraces Mr Orban’s populist model.

In Bulgaria, which joined the EU at the same time as Romania, the percentage of people who payed bribes doubled in the past five years, according to the Centre for the Study of Democracy, a think-tank in Sofia. After limited changes to the country’s judiciary were passed by parliament in 2015, the justice minister, Hristo Ivanov, resigned in protest over their inadequacy. Judges marched in the streets in solidarity, some dressed in their court robes.

The European Commission’s most recent review of Bulgaria urges the country to establish an independent anti-corruption body like Romania’s. The president-elect, Rumen Radev, hinted during his campaign this summer that he might support such a move. That is unlikely to happen. The lesson many politicians have taken from Romania is that the more independent the prosecutor, the greater the likelihood they will land in jail.