STILLWATER, Minn. (AP) — An inmate who is already imprisoned for murder has pleaded guilty to killing a Minnesota corrections officer in 2018 and was sentenced to life in prison.

Edward Muhammad Johnson, 44, pleaded guilty Friday to first-degree murder for killing officer Joseph Gomm. Under state law, a life sentence is mandatory for first-degree murder of a law enforcement officer.

Johnson told the court that he checked out a hammer from a prison metal shop and used it to hit Gomm in the head.

Gomm had been a corrections officer for 16 years at the time. He died of blunt-force injuries. His sister, Audrey Cone, told the Star Tribune the family is relieved.