REVERE, Mass. — Ricardo Martinez, an 11th grader, was in his high school lunchroom in April when a mass brawl erupted.

He watched, horrified, as a dozen teenage boys rampaged through the cafeteria, pummeling and kicking one another, overturning tables and chairs. Other students jeered and jostled to film the fight on their phones.

“It was like a stampede of videos,” said Martinez, now 18 and a senior. “Everyone was trying to get the best angle.”

But the pandemonium at Revere High School in Revere, Massachusetts, was just beginning.

Within minutes, students in other parts of the building began receiving text messages about the lunchroom brawl. Suddenly, teachers said, dozens of riled-up teenagers started racing down hallways and careening down stairways with their phones to get to the fight.

To stop more people from flooding into the cafeteria, Revere High posted staff members in front of the lunchroom entrances and issued a “hold” order to keep students in their classrooms. Administrators called police to help restore calm. The school said it ultimately suspended 17 students involved in the brawl.

Across the United States, technology centered on cellphones — in the form of text messages, videos and social media — has increasingly fueled and sometimes intensified campus brawls, disrupting schools and derailing learning. The school fight videos then often spark new cycles of student cyberbullying, verbal aggression and violence.

A New York Times review of more than 400 fight videos from schools in California, Georgia, Texas and a dozen other states — as well as interviews with three dozen school leaders, teachers, police officers, pupils, parents and researchers — found a pattern of middle and high school students exploiting phones and social media to arrange, provoke, capture and spread footage of brutal beatings among their peers. In several cases, students later died from the injuries.

Technology has increasingly fostered and amplified every stage of this aggression. The arguments often begin with student cyberbullying — or even perceived online disrespect among friends — which prompts in-person squabbles during school, educators and police officers said. Then classmates start filming and put pressure on quarreling students to brawl. Students later share and comment on the fight clips, further humiliating the victims and sometimes triggering additional fights. That violence has cut across some of the nation’s largest school districts, including in Los Angeles, Buffalo, New York, and Prince George’s County, Maryland, the Times’ review found, as well as in smaller school systems.

In some cases, the violent cycle has overwhelmed the schools. Some districts now face negligence lawsuits from parents, while others are seeing an exodus of teachers. Dozens of districts have sued social media companies, saying that the platforms’ “addictive” features caused compulsive student use, disrupting learning and burdening school resources. School administrators said they now spend a significant portion of their jobs working to thwart or untangle tech-stoked student beefs.