It is now 10 years since the European Court of Human Rights (ECHR) ruled that the UK's ban on prisoners voting in elections was unlawful, and yesterday the court reiterated its decision in the clearest terms.

Delivering its judgment in a case brought by a group of prisoners in Scottish jails, the court said that denying prisoners the vote was a breach of the European Convention on Human Rights. The judges held back from ruling that the prisoners should be compensated, but the message from the court to the UK is clear and has been for a long time: prisoners should be given the right to vote.

What happens now is uncertain. The Prime Minister David Cameron has made his views on the subject clear, saying the idea of prisoners voting makes him physically sick, and the House of Commons has voted overwhelmingly to preserve the ban.

Last month, the Scottish Government also restated its support for the principle that prisoners should not be able to vote in the referendum after the Supreme Court ruled against two inmates who were fighting for the right to do so.

However, the UK Government does appear to accept that some compromise will need to be found and has been making some attempts at reform. A draft bill has been published that includes a number of options including granting the vote to inmates sentenced to four years or fewer. The parliamentary committee that has been considering the bill has also suggested the best way forward would be to allow prisoners to vote if they are serving less than a year or are within six months of release.

Whichever option is accepted in the long run, some reform of prisoners' rights in this area is needed. The general principle that a term in prison can involve the withdrawal of certain civic rights, including the right to vote, is sound, but the idea of the right to vote being given to prisoners serving shorter sentences has the potential to attract a consensus.

There remains general agreement that those who commit very serious offences should expect the withdrawal of many of the privileges of being a citizen, but the prison system should also encourage rehabilitation as well as inflict punishment and serious consideration should be given to the parliamentary committee's recommendations for reform.

The reform should not go too far though. Caution is needed, for example, on the idea of granting the right to vote to those with only a short time left to serve when such a prisoner might have been in jail for a very serious offence, including murder. There is a strong argument that, in such cases, the prisoner should finish his term before fully resuming his or her role in society.

Such caveats aside, the UK Government should proceed with reform as soon as possible, partly because a prolonged confrontation with the ECHR is unwelcome but mainly because ensuring that, in appropriate cases, prisoners are engaged with society and the benefits of being a citizen could be a positive step in the direction of rehabilitation.