Image caption Chester and McGeoch are both serving life sentences for murder

The Supreme Court has dismissed appeals from two prisoners over the right to vote under European Union rules.

Convicted murderers Peter Chester and George McGeoch had argued that EU law gave them a right to vote - even though they cannot under British law.

Prime Minister David Cameron told the Commons that the ruling was "a great victory for common sense".

The European Court of Human Rights has previously told the UK to end the blanket ban on prisoners voting.

Parliament is considering legislation, but has not yet decided what to do.

Media playback is unsupported on your device Media caption Lord Mance: "The Supreme Court unanimously dismisses both appeals"

Following the Supreme Court's judgement, the BBC's legal correspondent Clive Coleman said: "Critically it ruled that EU law did not provide an individual right to vote, paralleling that recognised by the ECHR. Eligibility under EU law is a matter for national parliaments."

Convicted prisoners in the UK are banned from voting on the basis that they have forfeited that right by breaking the law and going to jail.

Successive governments have wanted to maintain that position but the European Court of Human Rights (ECHR) said a blanket ban on prisoners voting was disproportionate.

Analysis Following a case in 2005 brought in the European Court of Human Rights by a British prisoner, it is now pretty well established that the UK's blanket ban on prisoners voting is in breach of European human rights law. The government has accepted that, but human rights law allows a lengthy time period for responses to judgements, and any change to UK law is unlikely to happen any time soon. The reason for that, is that if such a challenge succeeds domestically, it can result in a "declaration of incompatibility" i.e. the law being challenged is incompatible with a human right under the European Convention on Human Rights (ECHR). If a challenge succeeds in Strasbourg, domestic law can be found to be a disproportionate restriction of the particular right. Governments are given time to respond, and that can be dragged out for many years - as it has been in the case of prisoner votes. It is difficult to get governments to act on the judgements of the ECHR if they do not want to do so.

Peter Chester raped and strangled his niece in Blackpool in 1977 and was jailed for life for her murder. He has served his minimum term but the Parole Board has refused to release him because it says he is too dangerous.

In 2008, he tried to join the electoral roll so that he could vote in the elections for the European Parliament. The Ministry of Justice said he could not until the law was changed.

In the second case, George McGeoch, serving life in a Scottish prison, argued that EU law allowed him to vote in local and European elections.

Although the ECHR has already told the UK to change the law, these two cases focused on whether prisoners as EU citizens have a right to vote even if Westminster says differently.

Last year, the government conceded that it would have to change the law to allow some prisoners to vote.

Ministers have published a draft bill which is being considered by Parliament. The proposals include limiting the vote to inmates who are serving either less than six months or four years.

A further 2,352 inmates have tried to bring voting cases to the European Court of Human Rights. Those applications are adjourned while judges wait to see what Westminster does.