Clashes have left at least 150 police officers injured after thousands of people marched through the northern German port city of Rostock on Saturday to protest against the forthcoming Group of Eight meeting of industrialised powers.
The summit will be hosted by Angela Merkel, the German chancellor, in Heiligendamm, 25km west of Rostock.
Some covered their heads and faces with black hoods, sunglasses and scarves, while others chanted protest slogans through megaphones, blowing whistles and waving flags.
Groups of protesters attacked police cars with rocks, bottles and paint bombs, authorities said.
They said a hotel where a US delegation is supposed to stay during the G8 summit was also attacked.
Rocks and broken beer bottles lay on the ground in front of a bank building where protesters smashed half a dozen windows.
Most stores along the route had boarded up there windows before the protests - with the exception of sausage stands and other fast food restaurants.
Riot police deployed
Around 13,000 police were on hand, and authorities said about 30,000 protesters had come for the daylong demonstration under the motto "another world is possible".
Riot police had been deployed in advance and officers videotaped the demonstration.
Police helicopters hovered overhead as demonstrators marched behind a truck blowing out soap bubbles and carrying a rock band that played anti-globalisation songs like "Block G8".
Dozens of different groups, including communists, anarchists and environmentalists, took part and messages were mixed: Some urged action from the G8 countries in the fight against HIV/Aids, African poverty and climate change, while others questioned the legitimacy of the existence of the G8 itself.
"The world shaped by the dominance of the G8 is a world of war, hunger, social divisions, environmental destruction and barriers against migrants and refugees," organisers said in leaflets handed out on the streets.
"We want to protest against this and show the alternatives."
A 12km security fence has been built around the resort where for the June 6-8 talks about climate change, aid and financial markets.
Eager to avert the violence that has accompanied past G8 summits, German leaders have issued pleas for peaceful demonstrations.
In 2001, a demonstrator was shot by police at a G8 meeting in Genoa. Since then, G8 summits have been surrounded by heavy security.
About 16,000 police officers are on duty in the week leading up to the meeting, Germany's biggest security operation since after World War II.
Protesters are expected to block roads leading to the leaders' summit.
They may also disrupt the arrival of delegates with their plan to blockade the nearby military airport at Rostock-Laage early next week.
Trouble may also flare after authorities refused permission for a demonstration by the far-right National Democrats (NPD) to go ahead in nearby Schwerin.
Organisers of the main anti-G8 demonstrations expressed concern that protesters who had planned to take part in the Schwerin rally might descend on Rostock instead.