Convicted murderer Graham Dwyer's chances of walking free have been given a boost by an adviser to the Court of Justice for the European Union (CJEU).

Dwyer, who was found guilty of the murder of Irish woman Elaine O'Hara in 2015, has appealed against his conviction on the grounds that data gathered from his phone should not have been used during his murder trial.

Spanish Advocate General Manuel Campos Sánchez-Bordona bolstered Dwyer's chances of overturning his conviction by stating that indiscriminate retention of mobile phone data could only be justified in cases involving national security. He added that mobile phone data could not be indiscriminately retained for the prosecution of offenses. 

The Irish Supreme Court referred the case to the CJEU in an appeal against a High Court verdict which stated that the legislation used to retain and access mobile phone data during Dwyer's prosecution was in breach of EU law. 

The State argued that the existing EU law on the retention of mobile phone data was unclear, but Sánchez-Bordona said on Thursday that the answers to any questions can be easily found in EU case law. 

He said that Irish legislation which allowed for mobile phone data to be retained for two years did not comply with EU law. 

He added that access to such data in Ireland was not subject to a prior review by a court or independent authority, which was also in breach of EU law. 

Sánchez-Bordona also stated that national courts cannot decide to limit the effect of EU legislation breaches to future cases only, meaning that the decision would have a retrospective effect. 

Sánchez-Bordona's opinion is not binding on the 15-judge court, but the CJEU tends to rule in line with the opinion of the Advocate General.

The CJEU will now enter a deliberative phase in the case and is expected to issue a ruling by March 2022. 

The court has also been considering referrals from judicial authorities in France and Germany on similar issues about the scope of EU data retention laws. 

The Irish Supreme Court will issue a ruling on the Dwyer case once the CJEU has announced its decision. 

The Court of Appeal will ultimately have the final say on the issue of mobile phone data retention in the prosecution of Dwyer in 2015. 

Graham Dwyer was found guilty of the 2012 murder of Dublin childcare worker Elaine O'Hara.

Gardaí accessed mobile phone metadata to pinpoint where Dwyer's phone was at crucial points and to highlight who he was in contact with. The data had been retained by a mobile service provider and played a significant role in Dwyer's conviction. 

Gardaí were able to ac access the data due to a 2011 law brought in on foot of an EU Directive. 

The directive was later struck down by the CJEU in 2014 and Dwyer has argued that the evidence obtained from the data should not have been admissible in court. 

The High Court ruled in 2018 that the legislation breached EU law, prompting the Irish State to appeal the decision in the Supreme Court. 

The Supreme Court ruled that a system of universal retention of data was not necessarily incompatible with EU law but said that Irish legislation for accessing data was not robust enough. 

The Supreme Court also said that the findings should only be applied from the date of the High Court ruling. 

However, it also referred the case to the CJEU to clarify whether the general regime of data retention is compatible with EU law.  

It also asked if a national court could decide not to make a decision retrospective if it would lead to chaos and damage the public interest, while it additionally sought to clarify whether a national court must declare legislation invalid even if the legislation helps to target serious crime. 

In a CJEU hearing in September, Irish Attorney General Paul Gallagher told the 13 judges of the CJEU that mobile phone data helped to play a key role in proving beyond reasonable doubt that Dwyer had murdered O'Hara in August 2012. 

Gallagher also told the court that mobile phones were often used to groom victims of crime before an offense took place. 

He said that it would be almost impossible for authorities to detect crimes committed over telecommunications if they were restricted in their use of metadata. 

Lawyers for Dwyer, on the other hand, argued that the laws in place at the time of O'Hara's murder were "extreme" and breached EU laws. They said that gardaí had used Dwyer's phone as a personal tracking device. 

Senior Counsel Remy Farrell also told the court that any attempt to remove the retrospective nature of the High Court ruling would essentially allow national courts to ignore EU charter rights and act with impunity.