Updated at 12:55 p.m. Oct. 12: Revised to include new details about the campus alert.

The Texas Tech student accused of killing a campus police officer this week was searched when he was taken into custody but still managed to have a gun on him, Lubbock Police Chief Greg Stevens said Thursday.

The shooting Monday prompted a lockdown that lasted for more than an hour as officials searched for the gunman at the Lubbock school.

Hollis A. Daniels III was captured within two hours and is charged with murder.

Hollis Alvin Daniels III (Lubbock County Sheriff's Office)

Lubbock police came in contact with Daniels after a firearm was reported stolen from a Lubbock home Sunday, Stevens said. The people at the home said the suspect made a "very specific threat," Stevens said.

Police stopped a vehicle matching the suspect's, but the driver, Daniels, refused to let them search the vehicle. Police said there was not enough cause to search the vehicle and a drug-sniffing dog was unavailable, Stevens said.

Acting on a report that a student had been acting erratically and may have a weapon, university police made a welfare check at the student's room earlier in the night and found evidence of drugs and drug paraphernalia, university Police Chief Kyle Bonath said.

Daniels showed up to the room and was taken to the police station on the perimeter of campus on a drug charge.

According to an arrest-warrant affidavit, Daniels — who was not wearing handcuffs — was standing near an officer in the department's briefing room while he completed paperwork for Daniels' arrest.

Another officer left the room and heard a bang. When he came back in, he saw the officer — identified Tuesday as Floyd East Jr. — fatally shot in the head. His service weapon was still in the holster, but Daniels and the officer's body camera were gone.

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

While law enforcement searched for Daniels, the school's counseling center called campus police to report that his family had called to say they were concerned he may have a weapon and had been making comments about suicide, Bonath said.

Daniels was captured near the Lubbock Municipal Auditorium when a Texas Tech officer tackled him, Lubbock police said. Police found a loaded .45-caliber pistol and a police body camera nearby.

Daniels told officers "that he was the one that shot their friend," the affidavit says.

During an interview later, Daniels said he messed up and did "something illogical," according to the affidavit.

A Texas Tech spokesman confirmed to The Associated Press on Wednesday that Daniels did not use a police department gun in the shooting.

A shooting has been reported at TTU Police Department. Shooter is at large. The campus is on lockdown. Take shelter. https://t.co/jOFvYnGgL6 — Texas Tech (@TexasTech) October 10, 2017

The campus and the Texas Tech University Health Sciences Center were placed on lockdown as police searched for Daniels. The lockdown was lifted about 9:30 p.m. after he was taken into custody.

Hollis Alvin Daniels III was arrested on drug charges in September. (Texas Tech University Police Department)

School officials said Thursday that it took more than half an hour for the alert to be sent because the place it would usually be generated — the police station — was a crime scene.

Daniels, of Seguin, was being held at the Lubbock County Jail on a charge of capital murder of a peace officer. His bail is set at $5 million.

Campus police had previously arrested Daniels on drug charges on Sept. 23, 2016, records show.

1 / 4Police search for evidence near the Texas Tech Police Department on Monday night. (Brad Tollefson / Lubbock Avalanche-Journal) 2 / 4Emergency personnel stage at an intersection across from Talkington Hall on the Texas Tech University campus.(Mark Rogers / Lubbock Avalanche-Journal) 3 / 4Police officers work the scene of a shooting at the Texas Tech Police Department.(Brad Tollefson / Lubbock Avalanche-Journal) 4 / 4Emergency personnel stage at an intersection across from Talkington Hall on the Texas Tech University campus on Monday.(Mark Rogers / Lubbock Avalanche-Journal)

Gov. Greg Abbott extended his condolences to the family of the officer killed in the shooting, and said he has mobilized the Texas Department of Public Safety to offer any assistance needed.

"As the Texas Tech campus deals with this heartbreaking tragedy, Cecilia and I pray for the continued safety of the students and the entire community," he said.

Heavy heart tonight. Thoughts and prayers with Texas Tech Police Department. — Chief Greg Stevens (@RockportChief) October 10, 2017

In a statement, Texas Tech President Lawrence Schovanec thanked the campus and city police, the Lubbock County Sheriff's Office and other agencies for their help.

"Please join me in extending our prayers and heartfelt condolences to the family of one of our Texas Tech police officers who was mortally wounded Monday evening," he said. "I know that the Texas Tech community will respond with support for the family and one another."

In another statement, Schovanec said the university will examine policies and procedures of the police department.

"In light of the tragic loss of life that we have experienced, it is appropriate that we conduct a post-event review process that will include a thorough review of our policies and practices to enhance the safety and security of our students, our police and the entire campus community."

East, the slain officer, had previously served as a guard at the university's El Paso office beginning in December 2014 until he was hired as a Texas Tech police officer in Lubbock on May 1, 2017, university police Chief Bonath said.

He leaves behind a wife and two daughters.