PORTLAND — A convicted murderer accused of mailing a threatening letter to a Social Security official pleaded guilty in federal court today.

Harold Rowe of Lewiston is charged with mailing threatening communications. Rowe spent 27 years in prison for a 1982 shooting death.

According to the prosecution, Rowe sent the letter to Mary Glenn-Croft, a deputy commissioner at the Social Security Administration, after he was notified that a mental health agency would receive checks on his behalf.

In a letter dated Sept. 14, 2011, Rowe wrote that he would likely kill somebody if the checks stopped going to him and that he also planned to kill one of his doctors, according to a court document filed by the prosecution.

Rowe also wrote a threatening letter the following month to the Social Security office in Auburn, the document stated. When law enforcement officers went to his home, Rowe admitted writing the October letter and said he was angry, confused and off his medication, according to the document.