"There have been offenses committed by smaller group [but] we now have the situation under control… I was there myself, I've seen nothing like that before," Hamburg police spokesman Timo Zill told the German broadcaster ZDF’s Heute show.
Police estimated that 12,000 protesters had turned up for a march against the G20 called "Welcome to Hell." The rally was called off when first clashes with riot police broke out but roughly 8,000 stayed on.
Violence erupted when a thousand of far-left protesters masked themselves and attacked police, Zill said, adding officers had been able to separate them from peaceful marchers.
Local police said on Twitter fires were reported across the city throughout the night, with flames reaching the height of a dozen feet. A car was set ablaze in a district close to the G20 venue. At least 76 police officers were injured.