By Christopher Hacker; Todd Feurer contributed to this report

CHICAGO (CBS) — A 24-year-old Cook County Jail detainee was charged Wednesday in connection with the beating death of his cellmate, who was a member of a rival gang.

Christian Gonzalez, who was being held in the jail on attempted murder charges, has been charged with first-degree murder, days after his cellmate, 19-year-old Pedro Ruiz, was found bleeding and unresponsive in his cell early Saturday morning. The two were members of rival gangs, according to police documents obtained through court records.

The Cook County Sheriff’s office is investigating all of the circumstances of Ruiz’s death.

Pedro Ruiz

Pedro Ruiz (Source: Cook County Sheriff)

“The office has launched a thorough internal investigation of all the factors involved in this case. We take all acts of violence in the jail extremely seriously and work tirelessly to prevent those intent on committing harm from being able to do so,” spokesman Matt Walberg stated in an email.

Gonzalez, who already was being held without bail on the attempted murder charges from last year, is scheduled to appear for a bond hearing Thursday afternoon.

Ruiz and Gonzalez were documented members of rival gangs. Gonzalez was a member of the Satan Disciples street gang, while Ruiz was a member of the Latin Saints gang, police records show.

TIMELINE: Murder Of Cook County Jail Inmate Pedro Ruiz

Gonzalez had been in the jail since June 2, 2019, when he was arrested on charges he used an assault-style rifle to shoot a man in 2017. He faces charges of attempted murder, aggravated battery, aggravated discharge of a firearm and illegally possessing a gun.

Christian Gonzalez (Source: Cook County Sheriff)

In that case, two suspects — one of whom was Gonzalez, court records allege — stepped out of a car and opened fire. The victim was hit at least two times before being taken to Stroger Hospital by an acquaintance, records show.

Ruiz had himself been arrested on an attempted murder charge less than 72 hours before he was killed. Court records show police said Ruiz matched the description of the suspect in a shooting in the 1800 block of West 47th Street in Chicago’s Back of the Yards neighborhood.

When asked why two members of rival gangs were put in the same cell, a jail spokesperson declined to comment, saying the investigation was ongoing.

This isn’t the first violent incident Gonzalez was involved in during his time in the jail. In November 2019, video from inside the jail obtained by CBS 2 shows Gonzalez was one of five inmates who put another detainee in the hospital after a minutes-long beating. After the beating was over, video shows Gonzalez throwing a joker card from a deck of playing cards onto the victim’s lifeless body. Sources said this points to ongoing feuds inside the jail.

Illinois jail regulations state gang activity should be considered when an inmate is assigned to a cell.