STILLWATER, Minn. (AP) -- A Minnesota judge ruled Friday that an inmate charged with killing an on-duty corrections officer with a hammer and knife is competent to stand trial.

Edward Johnson is accused of bludgeoning Joseph Gomm at the Minnesota Correctional Facility in Stillwater on July 18, 2018. The trial could take place during the middle of next year.

Johnson is charged with first-degree murder. At the time of Gomm's killing, Johnson was serving a 29-year sentence for killing his girlfriend in 2002.

Prosecutors say Johnson used a prison-issued hammer and an improvised knife to stab Gomm in the chest twice.