Romanians voted in huge numbers on Sunday to deliver a double blow to the ruling party by overwhelmingly rejecting measures seen as making it harder to tackle rampant state corruption.

In a non-binding referendum, voters rejected plans by the Social Democrats (PSD) to change anti-corruption legislation.

And in the parallel European election, exit polls predicted the party had gained 25.8% of the vote — sharply down from its 45% share in a 2016 national election. A brand new alliance of opposition parties, USR-Plus, secured 24% of votes.

The high turnout of 41% saw long queues at overseas polling stations, particularly in London and in Brussels where many began shouting outside the Romanian embassy after being denied the chance to vote.

Sunday’s double ballot was the first big popularity test for the PSD whose overhaul of the judiciary and changes to anti-graft legislation have drawn strong criticism from the European Union and the United States.

The referendum was called by centrist President Klaus Iohannis, who has often clashed with the PSD. It asked voters to decide whether the government should be banned from altering judicial legislation via emergency decrees - as it can do now - and whether they want a national ban on any amnesty and pardoning for graft-related crimes.

"The referendum succeeded with flying colours. Thank you Romanians. This is a clear vote for correct politics, for true justice. No politician can ignore your clear vote for an independent judiciary," Iohannis said.

What were Romanians voting on?

Citizens voted on two awkwardly-worded questions that essentially asked Romanians if they want to take a stand against criminal law changes that the parliament adopted on April 24:

"Do you support a ban on amnesty and pardon in cases related to corruption?" "Do you support the ban on the adoption by the government of emergency ordinances in the field of crimes, punishments and judicial organisation and the extension of the right to appeal directly to the Constitutional Court?"

The parliament, dominated by the PSD, recently voted to amend aspects of the country’s judicial system, which aimed to put an end to several ongoing corruption investigations and court cases involving high-ranking politicians and dignitaries.

They voted by a majority of 181 votes to alter the code of criminal procedure, making the statute of limitations shorter and lowering sentences for some offences.

The second referendum question addresses the right of the executive to issue emergency ordinances — these measures take effect immediately after being tabled, even if the house votes against them.

Who supports the referendum?

Iohannis launched the referendum on April 25, with PSD leader Liviu Dragnea seeing it as a move to gain more popularity ahead of presidential elections in November or December 2019, when Iohannis is likely to seek a second mandate.

Iohannis said the referendum was "also a referendum on the PSD" and a chance to teach the ruling left-wing social democrats “a lesson”.

Many PSD leaders have been or are currently being investigated in corruption-related cases, with Dragnea striving to modify the penal code and anti-corruption laws for this reason.

Dragnea himself served a suspended jail term and is awaiting the verdict in a second case.

While the referendum will not be binding, Iohannis has insisted the result will “send a signal”.

How has the government changed the rules?

The Romanian government adopted a decree at the beginning of May modifying the referendum threshold, meaning it will only be valid if at least 30% of those enrolled on the electoral register turn up at polling stations.

Prior to this, the referendum would have been valid if 30% of citizens enrolled were on the voter register.

Many saw it as a strategy from the PSD to make sure the referendum failed, but when questioned on the matter Dragnea said: “I do not know the subject so I cannot comment on it.”

How widespread is corruption in Romania?

Romania has repeatedly locked horns with the European Union over a series of judicial reforms proposed by the PSD, which Brussels thinks will hinder the fight against corruption.

READ MORE: EU threatens legal steps against Romania over rule of law

It was the fourth most corrupt state in the European Union after Hungary, Greece, and Bulgaria in Transparency International's annual Corruption Perceptions Index, coming 61st out of 180 countries overall.