Exclusive Details

A New York judge has just announced he's resigning ... this after someone lodged a formal complaint that he told an attorney he should get a hotel room and suck actor Viggo Mortensen's d**k.

Judge John W. Hallett, who serves as a Justice in the LeRay Town Court in Jefferson County, is taking heat for a courthouse conversation he had last January with a lawyer who was promoting a film festival honoring Mortensen.

The judge allegedly responded the festival was "about the gayest thing I have ever heard." The judge allegedly went on to say, "You and Viggo Mortensen should get a hotel room and suck each other's d**ks."

Five months later, the judge was talking to the same lawyer and allegedly made a gesture with his hand to his mouth to connote oral sex, patted the attorney lightly on the cheek and said, "There, there little boy."

The New York State Commission on Judicial Conduct opened an investigation and it appears the judge is resigning under pressure, before the hammer comes down.