Four teenage boys “took advantage” of an exterior door purposely left less than secure at Southwest High School in Minneapolis, barged into a class and beat a student over a dispute on Facebook, according to charges and a district spokeswoman.

The teacher in the room also was assaulted and suffered a broken finger while trying to break up the in-class melee on the afternoon of Jan. 22, Hennepin County Attorney Mike Freeman said Tuesday in announcing the filing of juvenile petitions alleging felony burglary and gross-misdemeanor riot against the defendants.

A judge will weigh whether the boys will be tried as adults. The defendants all live in Minneapolis and attend other high schools in the district. Charged are Terry D. James Jr., 16; and 17-year-olds Seneca L. Jones, Jayquann L. Kennedy, and Darshawn C. Turner.

“I think everyone would agree that all of our children deserve to have a safe school environment in which to learn,” Freeman said. “In this case, several teenagers who did not attend this school found a way to get in, disrupt a class and injure a student and a teacher. We decided to charge these four with burglary because it has tougher penalties than the lower-level assault charges.”

Jones told police that he had an argument on Facebook with the Southwest student and went there to fight him.

Kennedy’s mother, Teresa Leanna, told the Star Tribune that “my son wasn’t as involved as the others were. And that’s from video from a student in the classroom.”

Leanna said her son “goes to school every day. He’s a very good student.”

On the day of the incident, the high school sent a notice to families explaining what happened and prematurely said there were no injuries.

Late last year, revelations then of three student-on-staff assaults at the alternative Harrison Education Center high school and another at River Bend, a K-8 alternative school, prompted the district’s leadership to call a news conference to reassure the public that officials were doing all they could to ensure a safe atmosphere for students and staff.

A Southwest student inside the building let the four in through a door off a temporary walkway that was locked from the outside, according to the charges, even though she knew they were not students there. She then directed them to the room they were looking for.

There is only one door open from the outside during school hours at Southwest, and visitors are required to check in there.

However, on the day of the ambush, the magnetic lock on the door where the four teens entered was disabled during construction at Southwest, “to let contract workers in,” district spokeswoman Gail Plewacki told the Star Tribune. “This was a very unique situation. But obviously, someone took advantage.”

Prosecutors added there is no video surveillance in the area where the teens sneaked in.

A teacher told police he was beginning his fifth-hour chemistry class shortly after noon, the charges continued, when he saw what he thought were students in the hall trying to get the attention of someone in his class. So the teacher shut the door.

Several minutes later, the four teens opened the door and ran at a boy sitting in the back, charges said. They yelled threats at him, then punched and kicked him. He was left with abrasions on his face.

The teacher was struck while trying to break up the fight, leaving him with a broken finger.

The victim broke free from his attackers and fled the classroom.

The intruders also took off but were followed by school personnel, who saw them get on a Metro Transit bus at W. 47th Street and Xerxes Avenue S., a few blocks to the east.

Police obtained video from the bus, which helped identify the intruders as those whose images were captured on school video.

One of the teens on the bus can be heard on the video saying, “I clocked the teacher; didn’t I clock the teacher.”

Two were apprehended within a couple of days, one a short time later and the fourth late last month. Under police questioning, Turner said, “I went and fought, and that was it.”

Kennedy and Jones attend Washburn High School, and James is enrolled at Harrison, according to the petitions. Court documents did not disclose what school Turner attends but did note that he had attended Patrick Henry High School.