At least 27 people have been held by police for rioting in Sweden, after photos of children were posted on Instagram alongside sexual insults.
The account is alleged to have been set up by a teenage girl who attends the Plusgymnasiet school in Gothenburg.
It asked people to send in photos and allegations of the person's sexual history, publishing about 200 of them.
Some 200 people then responded to a rival Facebook page urging them to go to the school in retaliation.
The initial account on Instagram - a website and smartphone app which allows users to upload and edit photographs - was set up on Monday asking for pictures and accusations relating to other local teenagers in Gothenburg.
It attracted more than 6,000 followers, according to Swedish media, with users adding further insults to the pictures, and naming some of those photographed.
The images it posted were of both girls and boys - some of those pictured were allegedly as young as 13.
When the account was shut down, it moved to a Facebook account, and continued to be widely read in the school and elsewhere.
Dragged to the ground
The rival Facebook account then called for a protest outside the school - some reports said it had urged people to beat up the girl alleged to have run the accounts.
Police had been alerted to the page and were waiting at the school in the morning, but large crowds still turned up and the situation became violent.
Björ Blixter, a police media spokesman, was quoted by Swedish Radio as saying some people were throwing stones and bottles at officers and passing vehicles.
Video posted online allegedly of the incident showed a girl being dragged to the ground by some in the crowd.
The trouble then moved to a nearby shopping mall.
In total, 27 people were detained, said police. The teenaged girl alleged to have started the account has been taken to a safe place.
"We're talking to her and investigating whether a crime took place," Gothenburg police spokesman Stefan Gustafsson told BBC News.
He said there were no reports of any injuries or damage to property.
The school will be closed on Wednesday because of the risk of further protests. Mr Gustafsson said the police would also be monitoring social media for possible further trouble, and officers would be posted around the town at potential trouble spots.
Unless users delete their Instagram accounts by a deadline of 16 January, they cannot opt out.
The changes, which have sparked an angry reaction, also mean Instagram can share information about its users with Facebook as well as other affiliates and advertisers.