EU citizens could sue the UK government for compensation after it emerged up to two million may have been denied the right to vote in the European election.

Experts said the government had a case to answer over the treatment of EU citizens after many reported being denied their democratic right to vote.

READ MORE: Politics live: EU nationals denied a vote in European elections 

Voters across the country told of their disbelief at finding their names crossed off the register because of a failure by local councils to register them in time.

Anneli Howard, a barrister who specialises in EU law, told the Guardian newspaper there were multiple breaches of EU treaties, including article 20 of the Treaty on the Functioning of the European Union, which states that EU nationals have “the right to vote … under the same conditions as nationals of that state”.

She said: "If EU citizens are being asked to fill out additional forms that UK nationals are not, that’s discrimination.

However, Ms Howard said she doubted any judge would declare the election result unsafe as a result of council clerical errors.

READ MORE: Tory MP calls for new 'Department of the Union' in Whitehall to stop Scottish independence 

First Minister Nicola Sturgeon reacted angrily to the development with a post on her official Twitter account describing it as a scandal.

EU voters living in Scotland also took to social media to complain about their treatment under the hashtag #deniedmyvote with one describing how being unable to vote left her angry and upset in a reply to the First Minister.

Another described on Twitter how she was turned away from voting in Edinburgh.

Edinburgh University student Anika Edrei, 24, said she had received an email from Edinburgh Council promising a form would be sent, but said it did not arrive.

She said: "This is absolutely unconscionable. This election is a kind of second referendum on EU membership, so I was very invested in being able to vote, and I’m really angry to be disenfranchised in this way.

“There is nothing I can do to vote today. When I called the man I spoke to was very upset and angry, and said it was completely undemocratic. He was upset he couldn’t do anything more to help me.”

Earlier this week Britons living overseas claimed they had also been denied a vote because councils did not send them their postal voting ballots.

Experts said the situation was a “scandal we knew was coming” and that the government may have a case to answer in court.

The affected voters said they felt they were being “silenced” as this was the only election they had a right to participate in, being ineligible to vote in the referendum or general elections.

The SNP’s Westminster leader Ian Blackford tweeted: “It’s heartbreaking to see reports of so many EU citizens denied their right to vote today, all because of the incompetence of this Tory government.

“EU citizens are a fundamental part of our social fabric - their right to vote should be undeniable.”

The Labour MP David Lammy said the election system amounted to “ugly discrimination” for people who had endured “three years of being insulted, exploited and asked to apply to stay in their own homes”.

Claude Moraes, the Labour MEP for London and chair of the justice committee at the European parliament, was due to write to the home secretary, Sajid Javid, about the “depressing” and “extraordinary disenfranchisement” of voters on an important election for EU citizens.

He said: “The government knew that this was a very sensitive election for them.

"They didn’t have their say in the referendum, they weren’t allowed to vote in the general election and they would have wanted to vote in huge numbers for this election.

“They knew all of this and they should have put in special measures to ensure they could have been registered in time, with extra money for local councils and promotions to tell them what to do.”

Moraes said he wanted a “full inquiry into what went wrong” to be conducted swiftly.

Tanja Bueltmann, a historian and prominent citizens rights campaigner, said the election was a scandal that Theresa May “chose not to prevent” despite having been warned several times in the last month about the extra forms EU citizens were being required to submit in order to qualify to vote.

The Electoral Commission said it would be reviewing the treatment of EU citizens in the election.

The issue centred on the fact that the UK’s involvement in the elections was confirmed late because of the Brexit crisis and that EU citizens were required to fill in a form called the UC1 or EC6 to declare they would be voting in the UK and not their country of birth.

Many complaints also centred on three clerical errors: councils failing to communicate with EU citizens about a second form; councils not sending out the forms to people who requested them on time; and councils failing to register the forms when they were received.