Convicted murderer Graham Dwyer's bid to overturn his conviction has been boosted after he won a legal action against the Garda Commissioner and the State over the retention and use of mobile phone data.
In a significant ruling, the High Court ruled the Irish legislation under which gardaí accessed his phone records contravened EU law and the European Convention on Human Rights (ECHR).
The ruling could potentially have implications not just for Dwyer's appeal, but for other criminal cases.
However, the court said it was not an automatic consequence of its decision that any convictions would be quashed.
Dwyer (46), the former Foxrock-based architect, was sentenced to life imprisonment in April 2015 after a jury at the Central Criminal Court found him guilty of the murder of Elaine O'Hara.
Evidence relating to the use and movement of mobile phones formed a crucial part of the case against him.
Dwyer, who denies killing the childcare worker, brought a challenge against provisions of the 2011 Communications Act which allowed gardaí investigating Ms O'Hara's death to obtain and use certain data, including phone records, as evidence against him.
The 2011 Act, which obliged service providers to keep customer data for two years, gave effect to the EU's 2006 Data Retention Directive.
However, the directive was ruled invalid by the Grand Chamber of the European Court of Justice in 2014.
Yesterday, the High Court ruled provisions set out in Section 6 of the 2011 Act, which allowed gardaí of chief superintendent rank and above to request user data from telecommunications providers, contravened EU law and the ECHR.
Mr Justice Tony O'Connor found that the retention of data was general and indiscriminate.
He said there was no prior review by a court or an independent administrative authority for access to data and no adequate legislative guarantees against abuse of such data.
The judge said the Court of Justice of the European Union had ruled that even where the objective was fighting serious crime, this could not in itself justify national legislation that provided for the general and indiscriminate retention of all traffic and location data.
In the proceedings, lawyers for Dwyer also argued sections of the Act were repugnant to the Constitution.
However, Mr Justice O'Connor said the court would not be making a declaration on this issue.
The exact wording of declarations the judge will make in the case has yet to be decided.
Submissions on this are to be taken from counsel for Dwyer, the Garda Commissioner and the State at a later date.
Dwyer was not seeking to challenge his conviction in the proceedings. However, the ruling is likely to have a bearing on a challenge to his conviction set to be heard by the Court of Appeal.
He was not present in court as the ruling was delivered and is currently incarcerated at the Midlands Prison.
Mr Justice O'Connor said it was not an automatic consequence of his decision that trials would collapse or that convictions would be quashed.
He said Dwyer would be obliged, in his appeal, to address rules regarding admissibility of evidence.
The judge referred to a Supreme Court case known as JC, which related to the admissibility of evidence.
In that case, the Supreme Court ruled that evidence obtained in breach of an accused's constitutional rights does not necessarily have to be excluded at trial if the breach involved was not conscious and deliberate.
Dwyer's case centred on the European Courts of Justice's decision in 2014 to strike down the EU directive underlying the 2011 Act.
Among the flaws that court identified was that the directive interfered more than was strictly necessary with fundamental rights to respect for private life and the protection of personal data.
It also found the directive did not provide sufficient safeguards against the risk of abuse or unlawful access of data. Other EU countries have taken steps to amend their national laws, but Ireland has not done so.
Dwyer met childcare worker Ms O'Hara online.
She disappeared in August 2012 and her remains were not found until 13 months later in a forest at Killakee in the Dublin Mountains.
Mobile phone data obtained by gardaí had a large bearing on the investigation of her murder.