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

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