Lawyers have warned Britain's blanket ban on prisoners voting faces a renewed legal challenge after a European court ruling that any such sanctions must be "proportionate".
In a closely watched judgment, the European Court of Justice (ECJ) - the EU's highest court - ruled that member states were entitled to strip prisoners of their voting rights if they had been convicted of a serious crime.
The Government immediately declared that Britain's ban on prisoner voting would stay in place and remained "a matter for the UK Supreme Court and Parliament to determine".
However critics said that the judgment potentially opened the way for thousands of prisoners convicted of lesser crimes to challenge the ban through the courts.
In its ruling, the Luxembourg-based ECJ threw out a claim by Thierry Delvigne, a French former prisoner convicted of murder, that a ban on him voting in European elections violated his rights under the EU Charter of Fundamental Rights.
It said that the ban was "proportionate" given the gravity of his crimes and it was possible for member states to "maintain a ban which, by operation of law, precludes persons convicted of a serious crime from voting" in European elections.
Juliet Lyon, director of the Prison Reform Trust, said the judgment did not support the UK's blanket ban on all prisoners.
"This specific technical ruling by the ECJ is not the great victory David Cameron hoped for. It does not endorse the automatic, indiscriminate disenfranchisement of all sentenced prisoners," she said.
Sean Humber of the law firm Leigh Day, who sought to challenge the ban on behalf of more than 550 prisoners through the European Court of Human Rights (ECHR) - a separate body to the ECJ - said the Government could now be forced to change its position.
"This important judgment suggests that the UK's blanket ban on prisoner voting, which makes no distinction between the seriousness of the crimes committed, is contrary to EU law and a breach of our domestic law, piling yet further pressure on the Government to take action to allow at least some prisoners the vote," he said.
But even before the judgment was announced, David Cameron - who has ignored a series of ECHR rulings on the issue - made clear he had no intention of relaxing the ban.
"I'm very clear prisoners shouldn't get the vote and it's a matter for the British Parliament. The British Parliament has spoken and the Supreme Court in Britain has spoken so I'm content to leave it there," he told LBC radio.
Meanwhile the Government has welcomed a recommendation by the ECJ's advocate general that the court rejects a case brought by the European Commission challenging the UK's "right to reside" test which EU migrants must pass if they are to claim some benefits.
Cruz Villalon argued that while the test could be seen as a case of "indirect discrimination" it was nevertheless justified by "the necessity of protecting the host member state's public finances".