A 19-year-old freshman arrested in his dorm room at a North Carolina university with two firearms was obsessed with mass shootings and told police he planned to kill his roommate and himself if he failed to get into a fraternity, prosecutors said.

Paul Steber of Boston was arrested Tuesday after other students alerted High Point University campus security that he had a 9mm semi-automatic pistol and a double-barrel, 12-gauge shotgun in his room.

He was charged with possession of weapons on campus and making threats of mass violence, the High Point Police Department said in a statement.

Assistant District Attorney Lori Wickline told the court Wednesday that Steber had bought the guns over the weekend.

She said Steber told officers he had been planning a shooting spree since last Christmas and was "not going to be an outcast any longer" at the university.

Wickline said that Steber was trying to get into a fraternity and that "if his roommate got into a fraternity and he didn't, he had a plan to kill his roommate and himself."

The prosecutor said Steber had recently been watching videos of mass shootings, including the attack on a black church in Charleston in 2015 that left nine people dead, "so that he could learn what to do and what not to do."

She added that Steber told officers he had decided to enroll in High Point University "because it was easier to get guns in North Carolina than other states."

Martin Lentz attended the Newman School, a private school in Boston’s Back Bay, with Steber, according to The Associated Press. He said the news of Steber’s arrest “didn’t surprise me in the slightest.” He said there were warning signs that Steber could be dangerous.

“Basically every single day during class, all he did was look up the NRA, look up guns, politicians. He would look up politicians both Democratic and Republican and just stare at them,” Lentz said.

Police praised the students who alerted police.

"This incident illustrates the importance of the public reporting suspicious activity to authorities," said High Point Chief of Police Kenneth J. Shultz in a statement. "Information from the public is often the critical first step in preventing acts of mass violence."

In a video statement to students and parents, HPU President Nido Qubein referred to the suspect as "a young man making a really bad choice."

"It's a tough world we're living in, it really is," Qubein said. "We all should be questioning why is it like this. But crazy things happen. What is important is on this campus that we work diligently to ensure the safety of all of our students, staff, faculty every day."

Steber’s father traveled from Massachusetts for the hearing, in which Steber, seated and wearing black jail clothing, appeared via video link.

“This is any parent’s worst nightmare,” defense attorney John Bryson told in court. “He’s obviously very concerned about his son.”