The UK's highest court dismissed appeals brought by George McGeoch, from Glasgow, and a second prisoner, Peter Chester, from England, who are campaigning to overturn a prison voting ban.
McGeoch is serving his life sentence at Dumfries prison for the 1998 murder of Eric Innes in Inverness, while Chester is serving life in Wakefield prison for raping and strangling his seven-year-old niece Donna Marie Gillbanks in Blackpool in 1977.
The latest round of their legal battle against the ban preventing them from voting while in prison was rejected by seven Supreme Court justices in London.
Announcing the unanimous decision, Lady Hale, Deputy President of the Supreme Court, said: "Some people feel very strongly that prisoners should not be allowed to vote and public opinion polls indicate that most people share that view."
There is still a "substantial majority against it", she said, adding: "It is not surprising therefore that in February 2011 elected Parliamentarians also voted overwhelmingly against any relaxation of the present law. In such circumstances, it is incumbent upon the courts to tread delicately."
The SNP's Justice Secretary, Kenny MacAskill, said: "The Scottish Government has already made clear we do not agree that convicted prisoners should be able to vote while they are in prison."
Prime Minister David Cameron tweeted: "The Supreme Court judgment on prisoner voting is a great victory for common sense."
Scottish Conservative chief whip John Lamont said those convicted of a crime severe enough to warrant a prison sentence should lose their right to vote. He said: "That is what the vast majority of the public believes should be the case."
Under the Representation of the People Act 1983, prisoners are prevented from voting in parliamentary and local government elections. Under the European Parliamentary Elections Act 2002 a person is only entitled to vote in European parliamentary elections if he is entitled to vote in parliamentary elections.
However, the European Court of Human Rights ruled in 2005 that while it was up to individual countries to decide which inmates should be denied the right to vote from jail, a total ban was illegal.
Last year, the UK government conceded that it would have to change the law to allow some prisoners to vote and ministers have published a draft bill which includes limiting the vote to inmates who are serving either less than six months or four years.
John Scott, QC, chairman of the Howard League for Penal reform in Scotland, said the UK government should not consider the ruling to be the end of the matter. He said: "Nothing changes the fact that they need to do what the European Court has told them to do in this case.
"Unless they choose one of the options available to them there could be trouble ahead at Strasbourg."