An 18-year-old Maryland student accused of bringing a loaded handgun to his high school on Thursday told police he had earlier “felt anxious from social interactions between himself and students,” according to Montgomery County District Court records.

Alwin Chen of Germantown, who is a student at Clarksburg High School, remained jailed Friday. Police have recommended that he “be further evaluated for signs of any mental illness before his release.”

Chen, who turned 18 a month ago, is expected to stay locked up until at least Tuesday, when he is scheduled to make his first court appearance in the case.

In the wake of last week’s school shooting in Florida, Chen’s actions Thursday drew immediate concerns and attention.

His motive for bringing the loaded Glock 9mm to school have not been explained, but court documents filed Friday suggest he might have thought he needed to defend himself.

“We believe that the evidence will show that this is absolutely different than the tragedy in Florida,” said Jill Michaels, a lawyer representing Chen.

Just before 2 p.m. Thursday, a Montgomery County school resource officer (SRO) assigned to the school on Wims Road “received information that a student known as Alwin Chen was in possession of a loaded firearm and present within the building,” police wrote in a statement of probable cause used to obtain the charges against Chen.

The officer, along with a school security staffer, went to get Chen.

“It’s our understanding he was in an AP psychology class,” David Felsen, another lawyer representing him, said.

Chen was walked to a school office.

The SRO asked Chen whether he had a gun with him.

“Yes,” the student said, according to the court documents, which say Chen added that the gun was in his book bag and that he had a knife in his front shirt pocket.

The officer took control of both and arrested Chen.

He is charged with possession of a handgun, possession of a firearm by a person under 21 and possession of a firearm on school property.

Detectives have searched Chen’s home and are working to learn the purchase and ownership history of the gun, according to police officials.

Felsen said their client is a good student who has scholarship offers from at least two colleges. Chen had never before been arrested — in the juvenile or adult court systems, according to his lawyers. They spoke with him in the jail Friday.

“He is frightened and nervous and unfamiliar with the system,” Felsen said.

In court papers, police identified the gun as a “Glock Model 19 9mm handgun” that “was loaded with live rounds and had a working action capable of expelling a live projectile.”

Police confirmed Chen’s identify via his Maryland learner’s permit.

Read more: