Enoch Burke has been freed from Mountjoy Prison in time for Christmas.
Mr Burke was jailed in September for failing to obey an injunction that ordered him to stay away from Wilson's Hospital School in County Westmeath - where he previously taught German.
Judge David Nolan of the High Court ordered his release and said it would be a ‘travesty to spend time in prison for something that is entirely misconceived’.
In his ruling, Judge Nolan said that Mr Burke’s imprisonment was a burden on the taxpayer at a cost of €84,000 annually - on top of his teaching salary which he continues to be paid.
He said that his interpretation of Mr Burke’s behaviour was that the schoolteacher saw some advantage of his continued imprisonment, adding that he also felt Mr Burke has been acting under the influence of other parties.
The judge imposed a fine of €1,400 per day on Mr Burke if he breaches the court order to stay away from Wilson's Hospital School in County Westmeath.
The case will come under review again on the 21st of January.
Main image shows Enoch Burke. Picture by: Leah Farrell / RollingNews.ie
Reporting by Jessica Woodlock and James Wilson.