MIDDLETON (CBS) – Miguel Rivera, the man charged in the rape and death of an 11-year-old Haverhill girl, was involved in a violent altercation Tuesday night in the Middleton House of Corrections.

Rivera was arrested earlier this month connected to the death of the Haverhill sixth grader inside his Lawrence apartment. Prosecutors said Rivera gave the girl and her brother a “little red pill” before bed.

READ MORE: Man Secretly Buys Ice Cream For Everyone In Line At Nanabette's In Woburn

The girl was found to have the deadly opioid fentanyl in her system. On Tuesday, prosecutors announced that tests showed the girl had been sexually assaulted and Rivera was charged with rape of a child with force.

Miguel Rivera is brought into court on January 29, 2019. (WBZ-TV)

Around 8:30 p.m. on Tuesday, Rivera was involved in a prison altercation. Correctional officers quickly moved in, Essex County Sheriff Kevin Coppinger said.

READ MORE: Massachusetts State House Remains Closed To Public Weeks After COVID Restrictions Lifted

Rivera suffered bumps, bruises and a small cut. He was treated and released from the facility’s infirmary.

Following the incident, Rivera was placed in protective custody. He will be held in a single cell and have no interaction with other inmates, Coppinger said.

MORE NEWS: Gillette Stadium Mass COVID Vaccination Site Closes

Four inmates were involved in the fight. The Special Investigation Unit is working with the district attorney on potential charges.