With her boyfriend already serving a life prison term in the 2011 beating death of her 23-month-old son, a Baton Rouge woman who witnessed some of the beatings pleaded guilty this week to obstruction of justice in return for a sentence of 20 years behind bars.

Kimyia Stokes, the mother of Demarcus Gray Stokes Jr., faced up to a combined 50 years in prison on the obstruction and cruelty to a juvenile charges lodged against her in the wake of the toddler’s death on Oct. 23, 2011.

Earlier this year, state District Judge Trudy White convicted Stokes’ boyfriend, 27-year-old Randy Parker, of second-degree murder in the killing of Demarcus. White imposed a mandatory life term on him in September.

It was White who accepted Stokes’ guilty plea Wednesday and sentenced her.

“We believe that justice has been served with the plea and 20-year sentence of Kimyia Stokes,” East Baton Rouge Parish District Attorney Hillar Moore III said Thursday.

Parker, according to authorities, beat the boy at Parker’s Erie Street home because the child would not sit still for a haircut and after he urinated on himself.

Stokes, 26, told investigators that Parker, a convicted felon at the time, beat her son three times in less than 24 hours on Oct. 22 and Oct. 23, 2011. She said she witnessed two of the beatings and heard her son screaming during the third.

Parker told detectives he was “full of alcohol” the night he punched the boy with a closed fist and continued to hit the child after he fell to the floor.

Stokes told police that, after her son stopped breathing, she and Parker dressed the boy and “waited around trying to figure out what to do and say” before Parker finally called 911.

Dr. Bruce Wainer, the pathologist who conducted the boy’s autopsy, testified at Parker’s trial that the toddler suffered bleeding under his scalp and on the surface of his brain. Wainer also found a considerable amount of bruising on the child’s head, torso, arms and legs. He said the injuries were no accident. Some of the injuries were consistent with being punched, Wainer testified.

Stokes’ attorney, Carson Marcantel, said Thursday that White gave Stokes credit for the four years she has spent behind bars.

Parker had served six months in jail in Baton Rouge in 2008 on an attempted second-degree murder conviction and spent another six months behind bars a year later on a simple assault conviction.