A West Virginia inmate accused of killing his cellmate during an attack at Southern Regional Jail has entered a plea agreement.

WEST VIRGINIA AUTHORITIES BUST CRIME RING DELIVERING DRUGS BY DRONE INTO FEDERAL PRISON

Lucas Matthew Wagnar, 29, entered a Kennedy plea on Wednesday to second-degree murder in the 2022 death of Douglas Alan Cunningham, 79, The Register-Herald reported. A Kennedy plea means the defendant does not admit guilt but agrees that prosecutors have enough evidence for a conviction. He was sentenced to 30 years in prison per the agreement.

Morgantown, Beckley, Charleston crime

A West Virginia inmate has entered a Kennedy plea in the 2022 murder of his cellmate. (Fox News)

Raleigh County Prosecuting Attorney Ben Hatfield said he agreed to allow Wagnar to plead to a lesser charge partly because the state medical examiner’s report labeled the manner of death a homicide but stated the cause was a combination of coronary artery disease and the "stress of the acute injuries" suffered in the attack.

CLICK HERE TO GET THE FOX NEWS APP

The 30-year sentence will run consecutively to Wagnar's current one-to-five-year sentence for child abuse.