Attempted murder, drive-by shootings, aggravated assaults and robberies, rioting — all are crimes committed by members of the Hit Squad street gang since last year’s Cinco de Mayo festival. And all were enough to convince the St. Paul City Attorney’s office that gang members shouldn’t be welcome at the celebration this time around.

On Friday, Ramsey County District Judge Robert Awsumb agreed, ordering the gang and eight of its members to stay away from the West Side festival and the area where it’s held from 8 a.m. Saturday to 8 a.m. Sunday. The temporary restraining order issued by the judge prohibits members of the gang from gathering as a gang, or identifying themselves as a gang, or participating in any gang-related activities during the festival.

“The public should be safe from gang activity during a community festival,” Assistant City Attorney Daphne Lundstrom said. “And [gang members] still can go. They just can’t go together, and they can’t go as a gang.”

No one representing the Hit Squad appeared in court Friday.

The city had argued in court documents that the gang, which originated on the West Side around 2010 and numbers 20 to 25 known members, “is a violent criminal street gang with a substantial and growing presence in St. Paul.”

It also argued that the gang has targeted members from rival gangs and the general public, and has been tied to attempted murder, drive-by shootings, assaults and robberies.

The injunction prohibits Hit Squad members from exhibiting gang activity in the festival’s “Safety Zone,’’ an area between Plato Boulevard and Sidney Street E., and from roughly the Lafayette Road area and to the west.

Lundstrom was asked whether such injunctions could become a new rite of spring in St. Paul.

In 2009, the city used the same strategy to prevent violence by other gangs at Cinco de Mayo and Rondo Days festivities.

“The city does it very carefully,” she said, noting that the order applies to specific gang members who have either admitted to police that they are a part of the Hit Squad or who have identified themselves as such in online videos. “We don’t want to make a habit of it.”

City Attorney Samuel Clark, however, said he would return to court and use the strategy again if necessary.

On March 25, a large group of Hit Squad members armed with handguns gathered on the West Side to make a video promising retaliation against a rival gang.

The group scattered after police arrived. Last month, another gang member was arrested for aggravated robbery.

“I certainly hope it makes it safer,” Clark said of the move to protect a popular festival that features a parade, a 5K race, a children’s play area and ethnic dance performances. “All along, it’s been about stopping the violence we’re seeing in the community.”