In the few months that An Tso Sun had been in the United States, police allege, the foreign-exchange student used a school iPad to learn how to buy guns, boasted of a plan to massacre his high school classmates and assembled the beginnings of a “military-style” arsenal in his suburban Philadelphia bedroom.

The 18-year-old was arrested Tuesday night on a terroristic threat charge, a first-degree misdemeanor. On Wednesday, Upper Darby police hauled the ammo, crossbow, ski mask and gun-making components they found in Sun’s room to a news conference.

“When you’re able to amass these types of items and you’re not even a citizen of the United States … something’s wrong somewhere,” Police Superintendent Michael Chitwood told the gathered reporters. “Someone’s not watching.”

While police framed the teen’s behavior ominously, Sun’s lawyer said the teen was harmless — a military enthusiast who didn’t realize how a dark joke would be interpreted by his classmates, in a country that has been traumatized by school massacres.

“He didn’t grow up in the Columbine generation,” defense attorney Enrique Latoison told The Washington Post, referring to the 1999 Columbine High School massacre. “He’s only been here five months. He doesn’t get it like we get it.”

Latoison said Sun came to the United States in the fall from Taiwan, which has some of the strictest gun laws in the world.

He was hosted by the family of a Pennsylvania attorney, whom police have not named, and enrolled at Bonner & Prendergast Catholic High School in Drexel Hill for his senior year.

Latoison said his client had already been accepted to a U.S. university and had planned to major in criminal justice. But according to police, his behavior in high school alarmed his classmates.

#LIVE: Upper Darby Police give an update following the arrest of an 18-year-old student accused of making shooting threats at a local school. MORE: https://cbsloc.al/2I9NwjL#.WruToMMwzqE.twitter

Posted by CBS Philly on Wednesday, March 28, 2018

Last February, Chitwood said at a news conference Wednesday, Sun brought a “high-caliber” bullet to school and showed it off to a schoolmate.

He also showed the student a video of himself in a mask, operating a flamethrower, the police superintendent said.

Some time later, Chitwood said, Sun told a classmate: “Don’t come to school on May 1, because I’m going to shoot up the school.”

Sun told his classmate the remark was a joke, according to both police and the defense attorney.

But police don’t believe he was kidding.

Later, Chitwood said, Sun asked the same student how to buy a gun. This concerned the student enough that he reported the remark to a teacher, and the high school principal contacted police about it Tuesday morning.

“He’s not being bullied; he’s not mad at anybody,” Latoison told The Post. “He was just thinking he’s being funny. And he wasn’t.”

In any case, police began investigating Sun the same day. They learned he had logged into a school iPad to research AK-47 and AR-15 rifles and had searched for instructions on how to buy the weapons.

Convinced that the teen’s threat was serious, police obtained warrants, arrested Sun on Tuesday afternoon and then searched his host family’s home.

At the news conference, police had laid out items seized from the teen’s bedroom across two long tables.

These included a ballistic vest and military-style ski mask, a backpack with ammo pouches, a crossbow complete with scope and light, and a garrote — like the kind assassins use in movies. “You go up behind somebody and you put it around their neck and you strangle them,” Chitwood explained.

While police had not found any firearms in the room, Chitwood held up boxes of ammo, a device for efficiently loading bullets into an AR-15 or AK-47, and what he said was a kit with components for a homemade gun.

“When you add it all together, we believe he was planning something horrible,” Chitwood said.

On the contrary, Sun’s lawyer said, everything seized from the bedroom was legal and explainable without concocting a massacre plan.

Sun had brought the tactical vest from Taiwan, Latoison said, and had worn it with the backpack and ski mask to school for a Halloween party last year. “He dressed up as a black ops person with that gear. … He’s interested in military stuff.”

As for the crossbow, the attorney said, “he purchased it here. Any American can get it in any Dick’s Sporting Goods.”

Latoison disputed the police claims that Sun could have built a gun or had any intention to — though he did not specify what his client wanted the components for. “There’s nothing illegal about purchasing gun parts or playing with the gun parts,” he said.

“It looks bad,” Latoison acknowledged. “I know why it looks bad …  and unfortunately he won’t get a fair shake because of the climate we’re in.”

But Sun was not a would-be killer, he said — rather an aspiring law enforcement officer with a bad sense of humor.

The teen was imprisoned on $100,000 bail Wednesday. Latoison said his next court hearing will be April 11.

At the news conference, the police superintendent worried aloud about what might have happened had a classmate not reported Sun.

“Does it bother me? Absolutely,” he said. “He’s 18 years of age, and he’s looking to buy a gun; that’s ridiculous. What’s he looking to buy a gun for? Is he going to be a hunter? Or is he going to go out and kill somebody? Or is he going to shoot up a school?”

“That’s nuts,” Chitwood said. “That’s crazy. That’s insane. And you know what? If we didn’t stop him, he probably would have been able to buy a gun.”

More reading:

How the Parkland teens became villains on the right-wing Internet