Fights broke out among rival gang members on Carson Beach in South Boston yesterday and spilled out across the city, triggering a massive law enforcement response from at least five agencies to stem the violence.

Police said the gang members are part of a group of more than 1,000 youths who have used social media sites like Facebook to plan unruly gatherings on the beach on three of the past four nights. The beach falls under the jurisdiction of the State Police, who have been unable to prevent the violence.

The response yesterday resembled crowd-control tactics reserved for major sporting victories.

State Police were already on edge, after a trooper was accosted Sunday night by members of the group. The trooper chased one of the youths, who ran, clutching the waistband of his shorts “consistent with the manner in which a person with a gun would hold it,’’ said David Procopio, a spokesman for the State Police.

Yesterday, the beach, located steps away from the South Boston State Police barracks, attracted thousands of families and other Memorial Day revelers gathered for the unofficial start of summer. While the majority of the crowd was peaceful, the unruly youths again gathered at the beach and in nearby parking lots.

Three state troopers responded around 5:30 p.m. to the first report of a fight. When they arrived, they were confronted by about 1,000 people, Procopio said.

The troopers called for backup. State Police streamed in, State Police Special Tactical Operations teams and Boston SWAT teams arrived, and the Boston Police Department activated its Emergency Deployment Teams, which brought officers into South Boston from all over the city. State, Boston, Boston Housing, UMass, and Transit Police responded, for a total of more than 100 police officers.

For the third time in four days, police dispersed the crowd, rushing everyone off the streets.

The dispersal caused some tense moments between those not involved with the youths and police, who formed a line to herd the crowd south, down William J. Day Boulevard. Some jostled and argued with officers.

At one moment, SWAT officers were rushing a crowd down the boulevard, and a woman yelled at a state trooper because the little boy with her was trying to put his shoes on as the trooper was pressing them to keep walking.

As the crowd broke up, hundreds of the unruly youths boarded the Red Line at JFK/UMass Station. Some went north; some went south.

According to Transit Police, a group of young people ended up at Downtown Crossing and started a fight in the station that spilled onto the street. Clashes were also reported at other stops.

Hundreds who went south exited the T at Savin Hill and spilled into McConnell Park, where families were gathered with young children and a Little League baseball game was going on.

Annoyed residents, cooking hot dogs and watching after their children, clashed with and jeered at the unwelcome group of youths.

“Arrest them. Arrest them all,’’ said Chris Garside, 42, a Savin Hill resident who angrily confronted a youth who was leaning against a car. Several Boston police officers standing nearby walked over and whisked the youths away, back toward Savin Hill Avenue.

A handful of youths were taken into custody Friday and Sunday, and by 8:30 p.m. yesterday, State Police had arrested two people in the Memorial Day melee, Procopio said. There were no reports of serious injuries yesterday.

The groups have been larger and rowdier than even veteran South Boston troopers remember.

“Veteran troopers assigned to the State Police barracks for a couple of decades have never seen as large a volume of kids that were there tonight,’’ Procopio said.

Procopio said the troublemakers were mostly 14 to 19 years old.

He said State Police will meet with Boston police gang officers this week, in an attempt to identify gang members and key players who have organized the gatherings.

Guilfoil can be reached at jguilfoil@globe.com.

© Copyright 2011 Globe Newspaper Company.