A Cheyenne man charged with killing his girlfriend's 2-year-old son has pleaded guilty under a plea deal that will allow him to avoid the death penalty.

John Barrett, 26, pleaded guilty Friday in Laramie County District Court to an amended charge of second-degree murder and aggravated child abuse. In exchange for his plea, three other counts were dismissed.

"I delivered a blow to the abdomen which resulted in the death of C.A.C.," Barrett told the court. "I apologize to the court and the family for my actions."

Barrett said the incident happened on the afternoon of May 22, 2017, while he was babysitting the boy and his twin brother.

"The damage that you have done John cannot be undone," said Ruth Marcetic, the boy's grandmother. "You are the worst type of person John ... you killed a child."

Barrett's attorney, Diane Lozano, asked Judge Catherine Rogers to accept the plea deal and proceed immediately to sentencing, saying "this agreement represents the best of the justice system."

"This was a horrific, gruesome, heart-wrenching, violent and senseless crime," said Rogers. "He had no ability to escape you or the abuse he suffered at your hands and then you killed him."

Rogers agreed to the deal and sentenced Barrett to consecutive sentences of 50 years to life and 20 to 25 years. She also agreed to allow Barrett to serve the 20 to 25 year sentence for aggravated child abuse first.

"My heart goes out to Cynthia Clark and her entire family," said Brandon Booth, Barrett's attorney. "This is not something he intended."

More From KGAB