The Venezuelan illegal immigrant accused of killing Loyola University student Sheridan Gorman was caught with a weapon hidden in his pants inside the Chicago prison where he is awaiting trial for murder.

Jose Medina-Medina, 26, was found with a 6-inch shank in his pants during a search by Cook County jail officials on Thursday, according to the Cook County Sheriff’s Office and NBC Chicago.

Staff at the Illinois facility received reports that Medina had the makeshift weapon before conducting a pat-down shortly after 8 a.m.

Officials described the shank as “a sharpened piece of metal with a handle fashioned out of medical tape.”

Medina was charged with possession of contraband in a penal institution, the Cook County State’s Attorney’s Office announced on Friday.

It was not disclosed what Medina intended to do with the shank before it was confiscated.

Gorman, a freshman at the private Jesuit university, was fatally shot during a random attack while she and a group of friends were searching for the northern lights near campus in the early morning hours of March 19.

Medina allegedly approached the group wearing a mask and fired a single shot, striking the 18-year-old from Yorktown Heights, New York, in the back.

Medina was arrested and charged with first-degree murder, attempted first-degree murder, three counts of aggravated assault/discharge of a firearm, and aggravated unlawful possession of a weapon.

He was booked into the Cook County Jail on March 23 and has been held without bond since.

He has pleaded not guilty to the charges and faces a maximum sentence of life in prison without parole, as Illinois abolished the death penalty in 2011.

Medina’s defense attorney argued that he is cognitively impaired due to a previous gunshot wound to the head he sustained during a robbery while living in Colombia with his mother.

The injury left Medina with part of his brain missing and required him to relearn basic functions such as walking and talking, according to the defense.

“Today he has the brain development of a child,” his lawyer, Julie Koehler, told a judge during Medina’s arraignment.

Gorman’s parents criticized the failed policies that allowed their daughter’s alleged killer to enter the country illegally in 2019 and remain free on the streets before the murder.

“I don’t care what side of the aisle politically people are on, or if you’re right in the middle like us. This can’t happen. We’ve got to make changes,” Sheridan Gorman’s mother, Jessica, told “CBS Mornings” in April.

“There’s definitely policies that contributed to this happening and we can’t save Sheridan but we can’t just not do anything,” Thomas Gorman added during the interview.