A New York judge has resigned after making homophobic remarks involving Hollywood actor Viggo Mortensen.

Watertown, NY, attorney John W. Hallett has resigned as court justice of LeRay Town Court after the state Commission on Judicial Conduct filed formal charges against him.

Hallett is accused of making homophobic and inappropriate remarks and gestures, directed at another attorney, while referencing Mortensen, the Times Union reports.

Terence M. Brennen, a senior assistant Jefferson County attorney, filed a complaint on Aug. 16 accusing Hallett of mocking Brennen’s participation in the Snowtown Film Festival.

Brennen helped promote the festival in January 2017, but Hallett apparently told Brennan later that month that the festival, which was honoring Mortenson, “is about the gayest thing I have ever heard.”

Hallett allegedly then said: “You and Viggo Mortensen should get a hotel room and suck each other’s dicks.”

But that wasn’t all. Brennen alleges that in June 2017 Hallett made an oral sex gesture towards him, and then patted him on the cheek and said, “There, there little boy.”

Hallett was due to end his term after 2019, but will now step down on Dec. 31, 2018. As part of his resignation, he has agreed to refrain from serving in any judicial capacity in future.

Due to the conditions of his resignation, the Judicial Conduct commission has dropped its charges against him.

“Homophobic remarks and anti-LGBTQ sentiments have no place in the lexicon of the courts or the vocabulary of a judge,” Robert H Tembeckjian, the commission’s administrator, said in a statement. “Such statements undermine public confidence in the integrity and impartiality of the judiciary, which demands that a judge be and appear fair-minded and unprejudiced toward all who have business in the courts.”

Also Read: Pittsburgh man says he was attacked by 7 people because he is transgender