A father of four who set up a cannabis grow house so he could produce his own cannabis oil for pain relief from his medical condition has avoided a prison sentence.

Peter Maguire (41) was diagnosed with Barrett’s disease, a condition of chronic heartburn and reflux which can make the person more susceptible to oesophageal cancer.

Stephen Montgomery BL, defending, said Maguire, was a reformed heroin addict and soon found himself reliant on painkillers.

He decided that he should instead treat the condition with cannabis oil, so as not to relapse into a drug addiction.

Maguire of Donomore Avenue, Tallaght, Dublin pleaded guilty at Dublin Circuit Criminal Court to cultivation of cannabis at his home on October 2, 2017.

His 57 previous convictions include one for possession of drugs in 2002, while the majority of the remainder are for road traffic offences.

Garda Robert Whitty agreed with counsel that Maguire made full admissions when interviewed by gardaí eight days after the cannabis grow house was discovered in the attic of his home.

He outlined how he had learned how to operate the grow house after looking it up online.

Gda Whitty accepted that Maguire provided gardaí with a great deal of information in relation to the process of extracting the oil from the matured plants.

He said he was satisfied that this was the reason Maguire was growing the plants.

Judge Melanie Greally said it was “very fair evidence” from Gda Whitty and noted the “very positive steps” Maguire had taken in the past to minimise his risk of re-offending.

She said it was “not in the interest of the community to return him to a custodial environment” before she suspended a two year jail term on strict conditions.

Gda Whitty told Pieter Le Vert BL, prosecuting, that Maguire initially denied there were any drugs in the house when gardaí raided it but 16 cannabis plants were later discovered in the attic.

He confirmed that it had been set up as a grow house with all the necessary equipment.

The plants were five weeks off maturity and valued at €12,000 in total.

Maguire told gardaí he had been growing the plants for the previous two months and said he had made “a stupid mistake”.

Mr Montgomery said his client had four children under the age of 18.

He said Maguire began abusing heroin at 15 years old and was soon involved in criminality.

He has since turned his life around after getting help for his addiction in his local community.

Mr Montgomery said his client found that the cannabis oil gave him pain relief for his condition.