KEENE, N.H. — It was supposed to be about pumpkins.
Held every fall for nearly 25 years, the Keene Pumpkin Festival has drawn tens of thousands of visitors to this scenic city of about 23,000 in New Hampshire’s southwest corner, where they create a glinting tower of jack-o’-lanterns that, one year, held more than 30,000 gourds.
But the weekend’s festivities have come to include increasingly unruly parties outside the festival’s perimeter, near Keene State College. After numerous posts on social media last October, the scene degenerated into crowds of college-age revelers setting fires, ripping street signs from the ground and throwing bottles and rocks as they clashed with police officers clad in riot gear, leading to dozens of arrests and injuries.
Fed up, the Keene City Council pulled the plug, recently voting 13 to 1 against granting the Pumpkin Festival a permit for this year.
“I feel bad about the way outsiders control a tradition,” said Ellen Jones, 65, a waitress, who poured coffee as customers grumbled the morning after the festival was canceled. “It’s so maddening.”
Keene is not alone. College partying and youthful misbehavior are by no means new, but after some parties spun out of control, at least in part, observers say, because of the ability of social media to draw throngs of young people to events, document bad behavior and often to exacerbate it, cities and towns from Keene to Panama City Beach, Fla., are reconsidering or canceling gatherings that had been tolerated or encouraged in the past.
In Panama City Beach, a shooting and an ostensible beachside gang rape captured on video, both of which occurred in the midst of the city’s well-known spring break revelry, has left local officials looking for ways to scare away or tone down disruptive visitors. In recent years, the police and university officials in cities like Amherst, Mass., and Madison, Wis., have cracked down on annual outdoor parties they say have become too unruly. At colleges and universities including Rutgers, North Carolina State and Dartmouth, recent policies to limit alcohol or certain parties at fraternities and sororities are aimed at stemming dangerous behavior.
Officials in Panama City Beach have denounced the shooting and the sexual assault. Although spring break there is lucrative, officials have passed ordinances intended to scale back the partying, including a ban on drinking on the beach in March and some of April.
“We’ve got to run them off,” said Mike Thomas, 66, a Bay County commissioner who lives in Panama City Beach. He said it would be painful for some businesses to lose spring break business, but the city’s family friendly, year-round tourism could suffer if spring break sullied its reputation. “The spring break in Panama City Beach that you knew last year will never happen again,’’ he said.
Darrell Sellers, the community association manager at one of Panama City Beach’s high-rise buildings, said that on some weekends his building had to spend triple its security budget.
“They want to be in the middle of the chaos, and they want to take it up another notch and another notch,” he said of the revelers. “It’s all fueled by social media, in my mind.’’
Mr. Thomas said the partying had worsened over the past two years, even though Panama City Beach has stopped promoting itself as a spring break destination. The promotion, he says, is now done online, by bars and by the revelers themselves. “When they get on these different social media sites, they can get 300 to 500 people meeting in an hour,” he said.
Last year in Keene, the party began growing by word of mouth. “Every year, a bunch of kids from all of New England come and they get wicked drunk, and then they go home and tell their friends,” said Wayland Tolman, 19, who lives in nearby Nelson, N.H., and attends the Pumpkin Festival’s satellite party every year.
Last fall, a company called FinnarageTV, which promotes, DJs and films college parties, began promoting Pumpkin Festival celebrations online weeks ahead of the weekend’s festivities. As the parties ramped up, attendees said, social media told them where to go.
“There was stuff about that, saying, ‘Come to this street, 51 Blake or whatever,’ and then everybody goes and it gets crazy,” said Ricky Liscio, a sophomore at Keene State College, who attended the parties but said he was frustrated that people had come from out of town and destroyed the area.
The city manager, John MacLean, said he no longer thought it was possible for Keene to keep the event safe. “We had 17 different ambulance units, we had hundreds of police, which leaves the rest of New Hampshire and this region with very few resources out there,” Mr. MacLean said.
Part of the issue for cities and towns in recent years, said Karen Weiss, a sociologist at West Virginia University and the author of “Party School: Campus, Crime and Community,” is that students have moved farther off campus, bringing partying further into the public eye.
“People get excited and it just starts feeding the frenzy,” Dr. Weiss said. “It takes on a life of its own and then when police try to break this up, they become the enemy.’’
Dr. Megan Moreno, an associate professor of pediatrics at the University of Washington who studies social media and adolescent health, said social media can both expand those parties and glamorize dangerous behavior there.
“Posting about alcohol and alcohol-related events on Facebook both normalize alcohol use and lead younger students to think it’s something that’s expected of them, and it can also make people aware of events that they might not have heard of by word of mouth,” Dr. Moreno said.
Dr. Moreno said traditional media had long glorified alcohol use with films like “Animal House,” but added, “What Facebook and social media do is they take that power of the sexiness of putting something on media and they make it accessible to the everyday person.”
But it cuts both ways. Those same posts can make residents more aware of gatherings they might otherwise not have known about. Law enforcement officials around the country have taken to monitoring social media for signs of potentially dangerous parties and in Keene the police combed YouTube videos and other postings to find individuals responsible for the destruction.
In Gulf Shores, Ala., another spring break haven, the police took to Facebook, warning visitors intent on behaving in a disorderly or violent manner that “Gulf Shores may not be for you.”
Some cities and towns are finding other ways to cope. In Amherst, after an annual pre-St. Patrick’s Day rite called the Blarney Blowout turned into a melee in 2014, the town and the university took steps this year to contain the partying — in part by holding a concert with the performers Kesha and Ludacris that drew revelers who might otherwise have gone to house or street parties in town.
But in towns like Keene, where a crackdown is a relief to the party’s neighbors but means the cancellation of a beloved local tradition, the reckoning has been painful.
“That was bragging rights for an undistinguished, if picturesque, little town,” said Steve Lindsey, 55, a janitor and stagehand who lives in Keene. “To watch the tower come down, metaphorically, it breaks your heart.”