BOSTON (AP) — A Massachusetts judge who engaged in sexual acts with a social worker in his courthouse chambers has resigned.

A spokeswoman for the Supreme Judicial Court says Judge Thomas Estes submitted his letter of resignation on Friday, one day after he was suspended indefinitely by the court.

The letter, addressed to the chief justice of the state's district court system, said the resignation will be effective on June 15.

Estes wrote he was grateful to have had the chance to serve as a judge, and was leaving with "great sadness."

Estes could have been subject to removal proceedings by the state Legislature had he sought to continue serving.