Two convicted murderers have lost their High Court challenge to the constitutionality of the mandatory life sentence for murder.

They are 25-year-old Peter Whelan, who was jailed for life in 2002 for the murder of Cork student Nicola Sweeney, and 30-year-old Paul Lynch, who pleaded guilty in 1997 to the murder of Donegal pensioner, William Campbell.

Each claimed the sentence breached their rights under the Constitution and under the European Convention of Human Rights.

The two men claimed the mandatory life sentence interfered with the role of the judiciary and offended the independence of the judiciary enshrined in the Consitution. 

They also claimed their rights under the Convention were breached because they have no way of knowing how or when they are likely to be released.

The case could have had implications for more than 250 people serving life sentences for murder in Ireland.

But Ms Justice Mary Irvine rejected the men's claims on all grounds.

Peter Whelan was 20 when he was jailed for life in December 2002 for murdering 20-year-old student Nicola Sweeney at her home in Rochestown, Co Cork, in April of that year.

He was a neighbour of the Sweeneys. Ms Sweeney and a friend, Sinead O'Leary, were getting ready to go out when Whelan came into the house and stabbed both of them numerous times.

He was also sentenced to 15 years in prison for the attempted murder of Ms O'Leary.

Paul Lynch was sentenced to life in prison for the murder of 77-year-old William Campbell at Mr Campbell's home in September 1995.

Mr Campbell died after being struck seven or eight times over the head with a saucepan during a robbery.