Former New York Supreme Court Justice Thomas J. Spargo was sentenced Monday to 27 months in federal prison for attempting to extort donations from lawyers appearing in his court.

Northern District of New York Judge Gary L. Sharpe said that whether through “venality” or “misplaced exuberance,” Spargo was responsible for attempting to secure contributions of up to $10,000 from local lawyers for a fund to pay Spargo’s legal defenses as he contested a Commission on Judicial Conduct investigation against him.