ROCKLAND, Maine — A Maine State Prison inmate was unrepentant Thursday as he was sentenced to life for brutally murdering another prisoner.

“I made the decision to be the judge, jury and executioner,” Richard A. Stahursky, 37, said during his sentencing hearing in Knox County Unified Court.

Stahursky said he sleeps better knowing there was one less person alive who had sexually assaulted a child. He said he murdered 37-year-old Micah Boland to strike fear into the hearts of all the other sex offenders in the prison.

Stahursky admitted that he went into Boland’s prison cell on Feb. 28, 2014, tied him up, beat him — breaking bones and knocking teeth out in the process — and then stabbed him 87 times with a homemade knife.

Assistant Attorney General John Alsop said an autopsy found that Boland suffered stab wounds to his brain, eyes, jugular and heart.

Alsop had asked for a life sentence, saying that Stahursky had a record of violent offenses, the crime was premeditated, involved torture and occurred in a prison.

Justice Daniel Billings agreed to the state’s recommendation saying that Stahursky would likely reoffend if he ever got out of prison. Stahursky had been scheduled to be released in 2033 when he would have been 54 years old.

Stahursky has been in prison since 2002 when he was arrested for an armed robbery of a Mainway convenience store in Fort Fairfield. He was sentenced to nearly 20 years for that robbery. But he had more time added in the last decade for arson for setting a fire at the prison, for two separate stabbings of inmates with shanks, and for assaulting a prison guard.

When he was killed, Boland had served about six years of a 22-year sentence for sexually assaulting a 4-year-old girl in Liberty in 2007.

The judge said Thursday that while there may be people who feel the victim did not get a severe enough sentence for his crime against a child, it was not up to Stahursky or anyone else to mete out a sentence more severe than what the state had imposed.

Boland’s sister read a letter from their mother in which she said her son was a good man who was a good prisoner. Boland had earned his general education diploma and was taking art classes, she said.

Stahursky said during a prepared speech he read during Thursday’s hearing that the prison administration also should be held accountable for Boland’s death. He told Billings that even though he had twice assaulted prisoners with a shank and had warned them that he was planning to kill other inmates, he was allowed to remain in the general population with sex offenders.

Attorney Philip Cohen, who represented Stahursky along with attorney Michele Hallowell, said after the hearing that a relative of Stahursky had been the victim of sexual assault.

When Stahursky was charged with murder, he also was indicted for attempted murder for having a shank with the name of a corrections officer on it. That charge was dropped earlier this month in exchange for his guilty plea.

Stahursky told investigators after the stabbing that he had sought out Boland after conducting his own investigation within the prison to find out who had made allegations that he improperly passed items from one prison pod to another living area. Stahursky said the false allegations cost him his job as a hallway worker.

Corrections officials did not immediately respond Thursday to an email asking what additional precautions they planned to take in prison with Stahursky.