BOSTON (AP) — The second of two teenagers charged with taking a loaded gun to a Boston high school this week was ordered held without bail at his arraignment Friday at leas until a hearing to determine whether he is a danger to society.

The 17-year-old suspect was held based on a prior open gun case, according to the Suffolk district attorney’s office. The dangerousness hearing was scheduled for June 1.

Police found the guns at Charlestown High School on Thursday and took the 17-year-old student and a 13-year-old boy into custody and charged them with juvenile counts of illegal possession of a firearm and illegal possession of ammunition.

The younger student was held on $2,500 bail and ordered into home confinement at his arraignment Thursday, prosecutors said.

Police first went to the school just after 10 a.m. Thursday after staff found a weapon in the younger student’s backpack. It was a 9mm handgun with the slide of a Glock 26 affixed to a polymer frame, police said.

Police returned to the school at about 12:30 p.m. after school administrators located a 9mm Glock handgun in an unattended backpack owned by the 17-year-old student.

“The guns seized today in Charlestown High School present yet another reminder that this is not just a problem for police or for prosecutors or for school staff,” District Attorney Kevin Hayden said in a statement. “It’s a problem for all of society, a problem that demands discussion in boardrooms and backyards and everywhere in between.”