ROCKLAND, Maine — A 42-year-old Maine State Prison inmate accused of beating another prisoner to death with an electric guitar pleaded not guilty to murder by reason of insanity on Friday afternoon.

Guy E. Hunnewell was arraigned via a video conference between the prison in Warren and Knox County Superior Court in Rockland.

Hunnewell was indicted last month on the murder charge and on a separate aggravated assault charge in which he is accused of striking another prisoner with a shovel.

The murder charge accuses Hunnewell of killing fellow prisoner Alan D. Powell on June 25. Powell, 57, died from blunt force trauma of the head, according to the Maine medical examiner’s office.

Defense attorney Philip Cohen confirmed that the weapon the state claims was used in the fatal attack was an electric guitar.

Hunnewell responded to Justice Jeffrey Hjelm by saying not guilty to both counts. Cohen then added that Hunnewell also was pleading not guilty by reason of insanity.

Hjelm agreed to the request of Assistant Attorney General Leane Zainea, who is prosecuting the murder case, for an evaluation of Hunnewell by the state’s forensic unit to determine whether the prisoner is competent to stand trial and can be found criminally responsible.

Attorney Jeremy Pratt also was appointed by Hjelm to be co-counsel for Hunnewell.

Cohen and Pratt were co-counsel for Maine State Prison inmate Franklin Higgins who was acquitted in March on a murder charge.

The hearing lasted less than 10 minutes. The attorneys and judge were in the Rockland courtroom while Hunnewell was shackled and seated at a table at the prison.

Hunnewell is serving a 40-year prison sentence for killing his estranged girlfriend Stephanie Gilliland, 20, of Benton at his Fairfield apartment in December 1997. She suffered more than 21 stab wounds in that fatal attack.

Powell had served about 22 years of a life sentence for the June 1989 stabbing and strangulation death of Martha Daigle, 64, in her Waterville home. The victim was sexually assaulted.