Police in Denmark say they expect to bring charges against many of the 437 people detained overnight following clashes in the capital, Copenhagen.
Thousands of demonstrators planned to occupy a new building
Police used tear gas against thousands of young demonstrators who were protesting against the closure of a youth centre earlier in the year.
The protesters had tried unsuccessfully to occupy a different building.
A police spokesman said a record number of people were detained. They have all been released but charges could follow.
Some of the demonstrators threw smoke bombs, set fires and tried to break through police barriers and climb over police cars, the spokesman said.
"It started out as a peaceful demonstration but then there was more and more violence and the riots against the police started," spokesman Flemming Munch told AFP news agency.
No injuries were reported.
Organisers of the demonstration said as many as 4,000 people took part.
Left-wing activists had occupied the youth centre, in Copenhagen's Noerrebro district, since 1982. But the building was sold by the city in 2000 to a Christian group.
Squatters were evicted in March 2007, which led to violent street clashes and hundreds of arrests. The youth centre was later demolished.