The July 4 fireworks display in the Cleveland suburb of Shaker Heights was anything but a family affair.

As many as 1,000 teenagers, mobilized through social networking sites, turned out and soon started fighting and disrupting the event.

Thanks to websites like Twitter and Facebook, more and more so-called flash mobs are materializing across the globe, leaving police scrambling to keep tabs on the spontaneous assemblies.

“They’re gathering with an intent behind it – not just to enjoy the event,” Shaker Heights Police Chief D. Scott Lee said. “All too often, some of the intent is malicious.”

Flash mobs started off in 2003 as peaceful and often humorous acts of public performance, such as mass dance routines or street pillow fights. But in recent years, the term has taken a darker twist as criminals exploit the anonymity of crowds, using social networking to coordinate everything from robberies to fights to general chaos.

In London, recent rioting and looting has been blamed in part on groups of youths using Twitter, mobile phone text messages and instant messaging on BlackBerry to organize and keep a step ahead of police.

And Sunday in Philadelphia, Mayor Michael Nutter condemned the behavior of teenagers involved in flash mobs that have left several people injured in recent weeks.

“What is making this unique today is the social media aspect,” said Everett Gillison, Philadelphia’s deputy mayor for public safety. “They can communicate and congregate at a moment’s notice. That can overwhelm any municipality.”

A Philadelphia man was assaulted by a group of about 30 people who were believed to have gotten together through Twitter. In 2009, crowds swelled along the trendy South Street shopping district and assaulted several people.

On June 23, a couple dozen youths arrived via subway in Upper Darby, outside Philadelphia, and looted several hundred dollars of sneakers, socks and wrist watches from a Sears store. Their haul wasn’t especially impressive but the sheer size of the group and the speed of the roughly five-minute operation made them all but impossible to stop.

“The good thing is there were no weapons and nobody tried to stop them, either,” Upper Darby Police Chief Michael Chitwood said. “The only people that tried to stop them were the police when they rounded them up.”

Dubbed “flash mob robberies,” the thefts are bedeviling both police and retailers, who say some of the heists were orchestrated or at least boasted about afterward on social networking sites.

The National Retail Federation recommended steps stores can take to ward off robberies.