HILLSBOROUGH, N.C. — A University of North Carolina graduate student charged with killing his faculty adviser walked into a classroom building, shot the victim and then left, authorities said Tuesday, shedding light on an attack that led to a campuswide lockdown as police searched for the gunman.

Tailei Qi, 34, was charged Tuesday with first-degree murder and having a gun on educational property in Monday’s killing of Zijie Yan inside of a science building at the state’s flagship public university.

Chapel Hill city police arrested Qi in a neighborhood near the campus within hours of the attack, UNC police Chief Brian James said. He said investigators were trying to determine a motive and were still searching for the 9mm gun used to kill Yan.

Yan was an associate professor in the Department of Applied Physical Sciences who had worked for the university since 2019, UNC said.

On Wednesday, the school’s bell tower will ring in honor of Yan and students are encouraged to observe a moment of silence, UNC Chancellor Kevin Guskiewicz said.

Earlier Tuesday, Qi made an initial appearance in Orange County Superior Court. During the hearing, Judge Sherri Murrell ordered Qi to remain jailed without bond as an interpreter explained to Qi in Mandarin what was happening. His next court date is Sept. 18.

Qi is a graduate student in the department of applied physical sciences. He previously studied at Wuhan University in China before moving to the U.S. and earning a masters in mechanical engineering at Louisiana State University in 2021.