Enoch Burke has been released from Mountjoy Prison, following an order from the High Court.
The school teacher had appeared before the court in an attempt to set aside what he says is the "gravely flawed" and "unconstitutional" order made by Mr Justice Owens.
Mr Burke had denied claims that he was in contempt of court, insisting that he had wrongfully been imprisoned for objecting to "transgenderism". This comes after he had been ordered by his then employer Wilsons Hospital School, Co Westmeath to refer to a student by a different pronoun.
Mr Burke had earlier argued to the court that the High Court does not have the jurisdiction to consider his application to set aside Mr Justice Own's injunction.
He also stated that his constitutional rights of freedom of conscience were being completely ignored by Mr Justice Owens, because he refused to refer to a student as "they".
Mr Burke also insisted that there is no basis in Irish law where he is required to call a student by such a pronoun.
On behalf of the school, Alex White SC, dismissed Mr Burke's application to set aside the original ruling, calling it a "gross abuse of the court". He also said it was "bound to fail".
They argued that Mr Burke was trying to appeal this decision "by the back door".
Judges are generally unable to set aside orders made by judges from the same court divisions.
Counsel even argued that Mr Burke had declined to appeal Mr Justice Owen's decision, something which was acknowledged by Mr Burke.
They also said that the school "fully rejects" claims made by Mr Burke that his constitutional rights were ignored.
Counsel also stated that the school, including its students and students have rights too, and are entitled to some finality brought to these proceedings.
Mr Justice Sanfey eventually said that he hoped to make his decision on this issue in the next few weeks.
Enoch Burke's release was ordered by Mr Justice Mark Sanfey, having been imprisoned since last September, over his refusal to stay away from Wilson's Hospital School in Co Westmeath.
The judge had stated that Mr Burke was not required to purge his contempt, and he also agreed to comply with the terms made against him last year.
Mr Justice Alexander Owens had also granted Wilson's Hospital's permanent injunction prohibiting Mr Burke from attending the school.
Last September saw Mr Burke jailed for a second time for contempt, after refusing to comply with this order.
In his ruling, Mr Justice Sanfey reminded Mr Burke that the injunction remains in place, and that he is to stay away from the school.
He also outlined his hopes that the teacher would use his time to reflect on the situation.
Outside the court, Enoch Burke said that his "liberty had been robbed" in the last two years.
"Two years of my life have been taken away and yet, they're letting me out but he [Judge Sanfey] is not dealing with the issue, and that is the issue that must be dealt with", he said.
"Do we have constitutional rights in this country or do we not?".
Mr Burke had spent over 400 days in prison overall.