A Texas Tech University student confessed to killing a campus police officer who had been booking him on a drug possession charge, telling detectives he had done "something illogical" and that "he was the one that shot their friend," an investigator said.

In an affidavit released Tuesday, Det. Thomas Bonds of the Lubbock city police department said Hollis Daniels III confessed to killing Officer Floyd East Jr. after his recapture Monday night.

Campus Police Chief Kyle Bonath said at a news conference Tuesday that his department received reports of a student acting erratically who might have a weapon. University officials said East went to Daniels' room to perform a welfare check and found evidence of drugs and drug paraphernalia. East arrested Daniels and took him to the campus police station to book him.

According to Bonds, the 19-year-old wasn't handcuffed while East was processing the paperwork. Another officer left the room and then heard a loud bang. When he returned, he found East mortally wounded and Daniels gone. East's body camera was also missing, but his service weapon was still holstered.

Bonath said Daniels "pulled a gun" and shot East at the station, but he didn't specify whether it was a gun Daniels had on him or one that belonged to the department. He also didn't say whether East checked Daniels for weapons when arresting him, and he didn't take questions.

The campus was locked down for about an hour Monday night and the school's more than 36,000 students were ordered to shelter in place during the search.

Daniels was recaptured following a foot chase near the police station. He had the body camera and a handgun, Bonds wrote.

Bonath said that during the lockdown, the university's counseling center told police that Daniels' family had called to say he might be suicidal and have a gun. It wasn't clear whether the chief meant they called the center before or after East was shot, and school officials didn't respond to messages seeking additional details.

Daniels, who is from the San Antonio suburb of Seguin, is charged with capital murder of a peace officer and is being held in the Lubbock County jail on a $5 million bond. Online jail records don't indicate whether he has an attorney who can speak on his behalf.

He's had prior run-ins with the law. Daniels was charged two years ago in Guadalupe County, which includes Seguin, with possession of drug paraphernalia, but the case was dismissed. The Lubbock County sheriff's office confirmed that Daniels was arrested in Sept. 2016 on charges of marijuana possession and possession of drug paraphernalia.

Daniels is the son of H.A. "Dan" Daniels, a well-known figure in Seguin. The elder Daniels was a city councilman from 1998 to 2002 and again from 2006 to 2010, when term limits prevented him from running for re-election. He didn't immediately reply to phone messages seeking comment that were left at a family business and calls to the family's home got a busy signal.

The school's president, Lawrence Schovanec, said East's family is in the thoughts and prayers of the Texas Tech community. East, 48, joined the department as a guard at the El Paso office in 2015 and became an officer in May. It was his first job in law enforcement, according to the Texas Commission on Law Enforcement. Schovanec said East was married with two young daughters.

"I want to express my deep appreciation to the Texas Tech Police Department, Lubbock Police Department, Lubbock Sherriff's Office, and other state and federal law enforcement officials for their response," Schovanec said.

Gov. Greg Abbott issued a statement expressing his condolences and saying he had mobilized state law enforcement resources to aid in the investigation. State Attorney General Ken Paxton went to the school Tuesday to show support.

Texas passed a law last year allowing students with concealed carry permits to bring guns into university classrooms and buildings. But a person must be at least 21 years old to get a concealed carry permit in Texas, so Daniels wouldn't qualify.

The state Democratic Party apologized Tuesday for a tweet it sent linking the campus carry law to Monday's shooting. The party had tweeted that allowing guns on college campuses "was a dumb and dangerous idea" but later backtracked and deleted the tweet.