LUBBOCK (AP/CBSDFW.COM) — A police chief says a Texas Tech University student accused of killing a campus police officer was searched at some point but still managed to have a gun on him while being booked on a drug charge.

Lubbock police Chief Greg Stevens said during a news conference Thursday that 19-year-old Hollis Daniels III was searched after Texas Tech police officer Floyd East Jr. came to his dorm room Monday on a welfare check. He didn’t explain how Daniels could have had a gun on him after being taken to the campus police station.

“He was searched during his time in custody, but unfortunately he was able to gain access to a weapon,” Stevens said.

Police say Daniels wasn’t in handcuffs while East was booking him on a drug possession charge and that Daniels pulled a handgun, fatally shot East and escaped.

Stevens said that Daniels made it back to his dormitory but immediately left after he saw officers had already arrived.

Daniels was captured by a Texas Tech police officer within two hours.

Stevens also said that Daniels was stopped by his officers the day prior after his vehicle matched the description of a car involved in a theft of a gun at a home in the Lubbock area.

Stevens said his officers asked Daniels if they could search the car but he declined. Officers also had a suspicion that Daniels may have drugs in the car but they were unable to get a K-9 unit out to the scene to inspect the vehicle.

Police had previously said that Daniels used a gun he brought into the police station but didn’t say whether or not he owned the gun.

Daniels has admitted to shooting the officer.

He is charged with capital murder and a felony charge of possession of a stolen firearm.

Online jail records don’t indicate whether Daniels has an attorney.

(© Copyright 2017 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)