Image copyright Getty Images

It's a conundrum. You might expect a less corrupt exam system to allow ability to shine through regardless of the economic status of the students.

But research into an ostensibly successful anti-corruption campaign in Romania has revealed that one of the consequences is precisely the reverse of its aims: that poorer students actually performed worse in the cleaned-up exam.

The research was carried out by a team of three economists including Dr Oana Borcan of the University of East Anglia, who herself had witnessed this corruption as a final-year high school student in Romania in 2006.

The corruption became apparent as she prepared to sit the all-important Baccalaureate exam which determined whether or not students could progress to elite universities. The cheating, Dr Borcan said, was "blatant". Much of it happened "in plain sight".

"The morning before the exam, students would go around collecting some money, a little contribution to give to the invigilators... some would pay, some would not, it was voluntary.

Image copyright Getty Images Image caption CCTV cameras were used to detect and discourage cheating in exams

"I remember seeing students who I knew had low marks in general get top scores… this left a very strong and long-lasting impression."

So strong, in fact, that it played a part in the direction of Dr Borcan's subsequent career.

The Bac cheating reached a peak in 2010, when hundreds of students submitted identical answer-sheets.

This time, whistles were blown, and the ensuing media storm led to high-profile prosecutions. As a result, the government introduced tough anti-corruption measures for future exams.

CCTV monitoring systems were to be installed in exam halls, and a range of severe punishments were given maximum publicity to deter would-be cheats.

These ranged from fines and loss of jobs to prison sentences; students caught cheating would be banned from re-sitting the exam as a minimum sanction.

"There were many prosecutions," Dr Borcan said.

"Based on reports by the Anti-Corruption Directorate, between 2010 and 2013, 280 teachers and students were prosecuted, 99 of whom received a prison sentence of between six months and five years."

More stories from the BBC's Global education series looking at education from an international perspective, and how to get in touch.

You can join the debate at the BBC's Family & Education News Facebook page.

All the signs were that the anti-corruption campaign was working. By 2012, the average pass rate had almost halved compared with 2009, from over 80% to 43%. The previously soaring average scores had plummeted and stabilised.

The overall findings were widely welcomed. However, Dr Borcan and her co-authors Mikael Lindahl and Andreea Mitrut of the University of Gothenburg, wanted to find out exactly how effective the different aspects of the campaign had been. They used rigorous statistical analyses of data from each of Romania's 42 counties.

Other potential factors affecting the scores were eliminated by using control groups, and by comparing results in different areas where, for example, CCTV was introduced in different years.

Overall, they found that the cameras were responsible for up to 50% of the overall drop in pass rates. But it was the combination of this monitoring with the real threat of punishment, plus heavy media coverage, that made the campaign so effective.

Image copyright Getty Images Image caption Romania had taken radical steps to tackle concerns about corruption in education

They also compared the findings with those from a similar anti-corruption drive in Moldova, which had comparable problems of cheating, as well as in Cambodia and India.

The bombshell in this research, however, was revealed when they analysed the impact in terms of students' socio-economic background. The pass rates of poorer students - those in receipt of financial assistance payments - fell by 14.3%, compared to 8.1% for better-off students.

Their overall marks also decreased disproportionately.

As a result, the researchers conclude that "the anti-corruption campaign resulted in increased inequality between poor and non-poor students" - and that it "significantly reduced their chances of entering higher education".

The researchers admit they were surprised by the finding and looked hard to isolate possible reasons.

The most likely culprit, it emerged, was that the "collective" and "petty" forms of corruption, as witnessed by Dr Borcan herself, had a curious effect: they might be paid for chiefly by well-off students bribing invigilators, but everyone benefited. It gave the poorer students "a free ride" to higher marks.

Image copyright Getty Images Image caption The research raises questions about how exams are used as the entry point for universities

It also meant that when cheating was removed, the academic advantages of wealthier students became even more apparent. Cheating it seemed had provided a kind of levelling effect.

"There's a silver lining to all this," she said. "When corruption was widespread, we couldn't know the true scale of inequality… Our findings have revealed just how much greater the equality gap is."

"Once we know the true gap in attainment, the government can tackle the source of the inequality."

The authors also see wider implications for their findings, for example, about the wisdom of such heavy reliance on a "high stakes" exam for university entrance.

Although she has not had any direct response from the Romanian government so far, she was hopeful that a new government, and a new education minister, would take notice and act.

"I am hopeful they'll have the right dialogue and we will be able to raise the questions that the authorities need to look at."