CANBERRA, Australia — An 86-year-old pedophile former Catholic priest came a step closer to deportation to Ireland when a court on Friday upheld a decision to strip him of his Australian citizenship.

Finian Egan has been fighting a five-year legal battle against former Home Affairs Minister Peter Dutton’s decision to cancel his citizenship over the defrocked priest’s criminal record.

Egan initially won an appeal in 2016 in the Administrative Appeals Tribunal, a court that reviews government decisions.

But the Federal Court overturned that decision and a second tribunal hearing last year upheld Dutton’s action.

Egan on Friday lost a Federal Court appeal against the second tribunal’s ruling. His final option for appeal is the High Court.

Egan was a 25-year-old ordained priest when he migrated from Ireland to Australia in 1959.

He was convicted in New South Wales state in 2013 of sexually abusing three girls between 1961 and 1987. Egan was 79 when he was sentenced to eight years in prison.

He attempted to avoid deportation by applying to the Irish government in 2016 to renounce his Irish citizenship. He approached Ireland five months after Dutton canceled his Australian citizenship.

Australia can’t cancel citizenship if it would leave someone stateless. Irish law says people need to be citizens of other countries before they can cease to be Irish citizens.

Three Federal Court judges on Friday agreed that Egan remains an Irish citizen.

Dutton, who described Egan in a radio interview as a “horrible individual” who was not a “worthy member of our society,” was replaced as Home Affairs minister by Karen Andrews in March.

Andrews did not comment on the court ruling, but her department said in a statement there were strong provisions in Australian law for the minister to cancel a visa “if the person is considered to not be of good character.”

Egan, who was defrocked in 2018, remains in Australia free on parole on an ex-citizen visa. The visa allows him to stay in, but not re-enter the country.

He can appeal any decision by Andrews to deport him.

Egan’s lawyers said they had no instructions from him to comment on the latest court decision.

Melbourne Archbishop Peter Comensoli has backed Egan’s bid to remain in Australia. One of Egan’s victims has called for Egan to be deported to protect Australian children.