Two men who spent years behind bars in Britain before their "unsafe" convictions were overturned have lost actions at the High Court in London in their fight for compensation.

Irishman Victor Nealon, who was found guilty of attempted rape, and Sam Hallam, who was convicted of murder, asked two judges to rule that UK law is incompatible with the European Convention on Human Rights (ECHR) because it wrongly restricts compensation in "miscarriage of justice" cases.

Their judicial review challenges were the first to be brought against the coalition government's decision last year to narrow eligibility for an award.

Mr Nealon was given a life sentence and served 17 years in jail - ten more than the seven-year minimum term - after he persisted in claiming he was innocent.

Mr Hallam served more than seven years after being ordered, as a youth, to be detained for a minimum term of 12 years.

Both men were set free after appeal judges ruled that fresh evidence made their convictions unsafe.

Lord Justice Burnett and Mrs Justice Thirlwall, sitting in London, dismissed their cases.

Mr Nealon, was originally convicted of attempted rape on 22 January 1997 at Hereford Crown Court and sentenced to life.

His conviction was quashed in December 2013, four years after a DNA test pointed to 'an unknown male' - not Mr Nealon - as being the likely assailant.

Although denied legal aid, he was determined to receive compensation for the 17 wasted years spent in jail and the trauma he continued to suffer.

However, in June 2014, the Ministry of Justice rejected his application on the grounds that the DNA analysis "did not show beyond reasonable doubt that the claimant did not commit the offence".

Mr Hallam was arrested after a gang of youths attacked Essayas Kassahun, who died two days later, on 11 October 2004.

Mr Hallam, then aged 17, was convicted of Mr Kassahun's murder, conspiracy to commit grievous bodily harm and violent disorder.

But in May 2012 - seven years and seven months into his sentence - appeal judges decided all three sentences were unsafe.

They ruled that new evidence, in the form of timed and dated mobile phone photographs, dramatically undermined accusations that Mr Hallam had deliberately concocted a false alibi.

But the Ministry of Justice rejected his application for compensation for miscarriage of justice in August 2014 on the grounds that the phone evidence had been partly, if not wholly, attributable to Mr Hallam himself.