So your college football, basketball or hockey team just won or lost a big game. What are you going to do to celebrate a victory or blow off steam in the wake of a loss?

In too many cases over the last decade, college students and young people along for the ride have left campus parties and bars and taken to the streets. That’s what happened twice in the last week near the University of Minnesota. Following a big NCAA hockey win on Thursday and a disappointing loss on Saturday, hundreds of young people filled Dinkytown, the major commercial district near the Twin Cities campus.

Fortunately, university and law enforcement officials were mostly ready for what transpired. Though there was some bottle throwing, property damage and a number of arrests, officers dispersed the crowds relatively peacefully, and there were no serious injuries either night.

Research on such incidents has shown that a strong but calm police presence is the most effective response to rowdy postgame crowds. Offering alternative events is another helpful strategy. U officials encouraged students to come to Coffman Union for free pizza after the Saturday game, but some just stopped by to eat on their way to Dinkytown.

U administrators made it clear Friday that there would be a large police presence and that even bystanders could risk being arrested if things got out of hand. Journalists reported that police started clearing the streets around 10 p.m. Saturday, when onlookers with smartphones outnumbered students and others who had gathered in reaction to the Gophers’ loss.

University and police officials said only five of the 19 people arrested Saturday were U students, while all nine arrested Thursday were students. The Saturday numbers are telling. The overwhelming majority of U students did the right thing and stayed away from the disturbance.

The U is hardly alone in dealing with postgame rowdiness. There were large gatherings and some clashes with police on a number of campuses this spring after NCAA basketball tournament games, most notably at the University of Arizona.

‘‘Sports riots” have become relatively commonplace on U.S. campuses since the late 1990s. Since then, the disturbances, also known as “celebratory riots,” have even become the subject of academic study by people like Robert Carrothers, an assistant professor of sociology at Ohio Northern University. Carrothers has found that a kind of culture or tradition about postgame behavior has developed in which students are almost supposed to stage some kind of public event to prove how much they care about a team.

The Dinkytown disturbances last week were reminiscent of the back-to-back celebrations-gone-bad that followed the Gopher men’s hockey championships in 2002 and 2003. The difference this year: Even better preparation by U administrators and police kept damage to a minimum.

In 2002 and 2003, students and others burned vehicles, set fires in the streets, looted a liquor store and caused tens of thousands of dollars in property damage in and around Dinkytown. Although the debate over the scale and response to those incidents continued for weeks afterward, both melees could easily be described as riots. Last week’s drunken behavior, while unfortunate, did not appear to result in nearly as much property damage, although estimates were not immediately available.

Vice President for University Services Pam Wheelock said U officials will continue to work with student groups to discourage violent behavior and to come up with alternative postgame events. Peer pressure may be the most effective strategy.

The University of Minnesota has more than 50,000 full- and part-time students on the Twin Cities campus. As U student Thomas Strand argues in his related Opinion Exchange piece, the great majority of those students were not causing trouble in Dinkytown last week, but they have to live with the damage done to the U’s image by those who were.