Image caption MPs have overwhelmingly rejected the idea of prisoners getting the vote

The European Court of Human Rights has said individual governments can decide how to implement a ban on convicted prisoners voting.

The judgement means the UK will be able to decide for itself how to resolve the long-standing row over votes for inmates.

But the court says the UK only has six months to outline its proposed reforms.

In a landmark judgment the court found that an Italian prisoner's rights had not been breached.

In a summary of its judgement, the court said it "accepted the [UK] government's argument that each state has a wide discretion as to how it regulates the ban" both in terms of the type of offences covered and whether the matter should be defined in law or left for judges to decide.

This comes seven years after the court first ordered the UK to rethink its absolute ban on convicted prisoners voting.

'For Parliament'

The European court's judgement relates to a test case involving Italian Franco Scoppola, a convicted murderer who is demanding the right to vote.

Analysis It is seven years since John Hirst won his Strasbourg case and the government finally has an absolute deadline. The UK had argued in this Italian case that the judges had got it wrong in Hirst - but the court has instead reaffirmed that the UK's blanket ban on all convicted prisoners voting, regardless of the crime or sentence, is untenable. What's more, the European Court says that the international trend is to more prisoners being enfranchised. What happens next? MPs, who have already voted against reforms, will be furious. The court's critics are predicting a constitutional clash. Ministers know they have to come up with something or risk paying compensation to lots of prisoners. Some backbenchers want ministers to publish a bill and then never act on it, technically meeting the court's request and doing no more. But, if something is put before MPs, don't expect more than what's needed to avoid further legal challenges.

The UK was made a party to the case as it has Europe-wide implications.

The coalition will hope to find some form of compromise acceptable to the majority of Conservative backbench MPs, as well as the court, although nothing short of maintaining the blanket ban on prisoners voting is likely to satisfy some on the Tory right.

Conservative MP Dominic Raab suggested the European Court and the UK Parliament were set for a "major constitutional clash" over the issue.

"One thing is clear, the judges want to give more and more prisoners the vote despite this being a novel right they have made up, with no basis in the convention," he said.

If the proposals are defeated in Parliament, the issue will become legally highly complex.

A Downing Street spokeswoman said it would consider the implications of the judgement for the UK.

"The attorney general has argued... it is for Parliament to judge whether and which prisoners should have the vote, and that the court should not interfere with that judgement unless it is manifestly without reasonable foundation."

Commons vote

Labour said it believed those given custodial sentences should not be entitled to vote.

"While we recognise the importance of the European Convention on Human Rights and the European Court of Human Rights, we feel the original decision back in 2004 was wrong," shadow justice secretary Sadiq Khan said.

In a show of opinion last year, the Commons rejected the idea of enfranchising prisoners by 234 votes to 22.

At present in the UK, only prisoners on remand are allowed to vote.

In 2005, the European Court of Human Rights ruled the ban unlawful, and in 2010, the Council of Europe, which enforces the court's decrees, urged the coalition government to rectify the situation.

Ministers promised to do the "minimum possible" to comply with the Strasbourg court's ruling and, in April last year, lost an appeal against the move.

But supporters of giving prisoners the vote say it could engage them further in society, reducing crime.