An 18-year-old Maryland student charged with bringing a loaded handgun to school told detectives he regularly walked around school with a weapon hidden in a backpack or in a holster under his shirt to protect himself and classmates from a possible mass shooter, according to new court documents filed in his case.

The weapon, according to Alwin Chen — an honor student at Clarksburg High School who was arrested Feb. 15 — was a Glock semiautomatic handgun he built from parts ordered online and tools bought at Home Depot, the documents say. Chen also had access to weapons owned by his father and kept in the family’s townhouse, the filings say, including an AR-15 assault-style rifle, a pump shotgun and two revolvers.

Chen’s familiarity with guns, his willingness to bring a loaded weapon to school and his journal writings show that he remains a public risk and should not be released from jail pending his trial, prosecutors said in court documents.

The Clarksburg senior was “always talking about bringing guns to school and saying how he would kill anyone,” another student told police, according to the prosecutors’ filing.

Chen was arrested 11 days ago after that same student told a school resource officer that Chen had a loaded weapon at school. The alert from the student came a day after a gunman in Florida left 17 dead at a high school.

After Chen’s first appearance in court, his attorneys said prosecutors had overstated the risk Chen posed when prosecutors said he had been found with a “list of grievances,” in addition to the gun, a key detail that the judge cited in explaining why he held Chen in jail rather than allow him to be released on bond. Chen’s lawyers said that there was no such list and asked for a new bond hearing. That prompted the prosecutors to reply with added details about the threat they say Chen poses.

The new prosecution filing acknowledges that there was no list of grievances found. Prosecutors indicated that there was no ill intended when using the term. They said they used that description after consulting with police for a few minutes about the case before Chen’s first hearing, without speaking directly to the lead detective.

In the new filings, prosecutors homed in on a journal they said Chen kept, noting entries from last spring when he wrote of feeling lonely and worthless. “I might start doing some vigilante operations,” he wrote on May 1, 2017, the court filings state. “I don’t plan on killing people, but I’m surely going to hit evil people.”

Earlier entries, some of them undated but which appear to go back to at least the spring of 2016, show Chen writing about feeling “angry at myself and mad at the world” and about his worries he could be mentally ill, the filings say.

“Sometimes I think I am crazy or mentally ill,” he wrote, according to the prosecutors’ filing. “But I hide it and refuse to admit it because I know how to cope and blend into society but it’s just too lonely.”

“I want to kill all evil forces,” he wrote, according to prosecutors, “but I’d die for nothing.”

District Judge John Moffett, who presided over the first bond-review hearing for Chen, has scheduled a second for 1 p.m. Tuesday, according to court officials. Prosecutors are expected to argue that Chen should be kept in jail pending trial; his attorneys will probably argue for release.

“The prosecutors’ own filing demonstrates he is not a risk to anyone else,” said David Felsen, an attorney representing Chen with Jill Michaels. “Their allegation as to motive for bringing the gun to school for protection, given the circumstances in the country, is not a surprise.”

Felsen said his client had asked to get his schoolwork so he could try to keep up with his classes while jailed.

The prosecution filing was written by Montgomery County Assistant State’s Attorney Frank Lazzaro, who also explained the lead-up to Chen’s arrest Feb. 15 after the student alerted resource officer Troy Melott to the gun.

The student said he’d seen Chen carrying the gun “numerous times” since December, according to the filings. Melott and a member of the school security staff pulled Chen out of his AP Psychology class and brought him to a school security office.

The court filing says that Melott asked Chen whether there was anything in his book bag.

“There is a loaded Glock 19 inside the book bag,” Chen answered, the filing says.

The gun contained 13 live rounds, according to prosecutors.

Melott also found a slim, black leather gun holster worn on Chen’s belt, the filings say.

Chen was arrested and agreed to a recorded interview with a detective, in which the student was cooperative and polite. He admitted bringing his assembled Glock to school and “described it as a regular occurrence,” prosecutors wrote.

Last week, at the first bond hearing for Chen, Lazzaro told a judge that Chen had access to guns and a “list of grievances against students at the school.”

Speaking to reporters outside the courthouse after Chen was held in jail, State’s Attorney John McCarthy also invoked a list, saying: “Found during his arrest, he had written down a list of grievances and reasons why he brought the gun to school with him.”

School officials later said documents recovered from Chen contained no threats or plans to harm anyone at the school.

Police officials described Chen’s journal entries much the same way.

The filing from prosecutors states there was a two-page, handwritten, undated document found in Chen’s backpack on the day he was arrested. Under the title “Memo,” Chen wrote that he was “upset about a lot of things” and worried about anxiety and mental illness. The revised description of Chen’s writings says nothing about a list of grievances.

It is not clear how Chen built his 9mm handgun. In an arrest warrant, and the new court papers, police and prosecutors describe the weapon as an operational Glock model 19.

“He presents an unacceptable danger to the community,” Lazzaro wrote, arguing that Chen should remain jailed.

Read more: