Hamburg, Germany (CNN) German riot police clashed at times with thousands of protesters in Hamburg on Thursday evening as world leaders, including US President Donald Trump, arrived in the city ahead of Friday's G20 summit.

Throughout the afternoon and night, police used water cannons as protesters threw bottles and smoke bombs during the anti-capitalist Welcome to Hell march, which began about 2 miles from where the summit will be held.

Firecrackers and bottles were also thrown at riot police who attempted to disperse the crowd as police helicopters circled overhead. The clashes began after police ordered many protesters to remove their masks.

At least 76 officers were hurt, including oner who had a serious eye injury after a firework went off nearby, Hamburg police said. It was unclear whether that figure included two officers whose sight was affected by someone pointing a laser at their helicopter.

They didn't give the number of injured protesters and bystanders, but said one person had been arrested for throwing a bottle.

Police in helmets gather as protests swell in Hamburg, July 6, 2017.

There were about 8,000 protesters, according to a police estimate, a far cry from the 100,000 expected on the two days of the summit. The protest dissipated around midnight.

"I came here because in general I'm totally against the G20 summit," Nicklas, a 21-year-old student protester, told CNN earlier.

"...It's the root cause or reason for what's going wrong in the world. Wars can be bad but capitalism kills."

Photos: G20 protesters clash with police in Hamburg Protesters gather near a burning barrier during a demonstration against the G20 summit on Friday, July 7, in Hamburg, Germany. Protesters clashed with authorities as world leaders gathered for the two-day economic summit. Hide Caption 1 of 20 Photos: G20 protesters clash with police in Hamburg Protesters are visible through a hole in a destroyed window of a supermarket in Hamburg's Schanzenviertel district on July 7. Hide Caption 2 of 20 Photos: G20 protesters clash with police in Hamburg A fire rages during demonstrations against the G20 summit July 7 in Hamburg. Hide Caption 3 of 20 Photos: G20 protesters clash with police in Hamburg Police stand guard in the street while protesters erect barricades July 7 in Hamburg. Hide Caption 4 of 20 Photos: G20 protesters clash with police in Hamburg Riot police head down a road during the "Welcome to Hell" protest march on Thursday, July 6. Hide Caption 5 of 20 Photos: G20 protesters clash with police in Hamburg Protesters erect burning barricades in front of the Rote Flora, a left-wing cultural center, on July 6 in Hamburg. Hide Caption 6 of 20 Photos: G20 protesters clash with police in Hamburg An officer looks on as barricades burn in front of the Rote Flora center. Hide Caption 7 of 20 Photos: G20 protesters clash with police in Hamburg Police stand in front of the Rote Flora left-wing center as debris smolders in the street. Hide Caption 8 of 20 Photos: G20 protesters clash with police in Hamburg A demonstrator is sprayed by water canons. Hide Caption 9 of 20 Photos: G20 protesters clash with police in Hamburg Police and protesters clash during the Welcome to Hell march. Hide Caption 10 of 20 Photos: G20 protesters clash with police in Hamburg A man wearing protective goggles moves away from officers trying to clear the streets using water cannons. Hide Caption 11 of 20 Photos: G20 protesters clash with police in Hamburg Police gather at Hamburg harbor before the anti-G20 protest march. Hide Caption 12 of 20 Photos: G20 protesters clash with police in Hamburg Riot police use a water cannon on demonstrators. Hide Caption 13 of 20 Photos: G20 protesters clash with police in Hamburg Protesters march during the rally. Hide Caption 14 of 20 Photos: G20 protesters clash with police in Hamburg Protesters clash with riot police. The protest escalated throughout the day and evening. Hide Caption 15 of 20 Photos: G20 protesters clash with police in Hamburg Police attempt to clear the street while using water cannons and pepper spray on demonstrators. Hide Caption 16 of 20 Photos: G20 protesters clash with police in Hamburg A woman wearing a sign depicting the G20 summit world leaders blows bubbles at Hamburg harbor before the protest march. Hide Caption 17 of 20 Photos: G20 protesters clash with police in Hamburg Participants in the protest. Police said one person had been arrested by late Thursday night. Hide Caption 18 of 20 Photos: G20 protesters clash with police in Hamburg A banner on a bridge reads "President Macri, Don't sell our Argentina." Officials said at least 76 police officers were hurt. Hide Caption 19 of 20 Photos: G20 protesters clash with police in Hamburg Officials said the originally peaceful protest became violent, with firecrackers and bottles being thrown at riot police. Hide Caption 20 of 20

Julia Reusing, 27, from Frankfurt, was upset that police disrupted the demonstration.

"If this is all we can do just for showing our opinion and giving a statement -- and if the state forces are just shutting us up ... I mean what kind of state do we live in?" she said about authorities' initial moves to control the protests.

There were also periods of calm during the day, where demonstrators marched through the port city in northern Germany, home to some 1.8 million people.

But after nightfall there were flames in the streets.

As marchers reached the Rote Flora, a building that has been a traditional gathering spot for leftists, a pile of trash was set on fire in the street. Police used a water cannon to put out the blaze, which consumed bicycles, bags of trash, and other items found nearby.

Protesters set fire to items in the street near the Rote Flora left-wing center.

In another area of the city, one car was destroyed by a fire.

Police said the windows of several shops in two districts were smashed.

Protest breaks apart

Earlier, the main body of protesters splintered and one group took over an intersection where a truck with a sound system blared music suitable for a house party.

Police stayed on the fringes, backed by two trucks with water cannons.

Mark Meyer is part of a grass-roots team of 100 or so lawyers who are volunteering to help protesters understand their legal rights if they are detained.

He told CNN that the police "wanted to crash and smash this demo from the beginning" and were looking for any excuse to do so.

He also said the red zone -- the no-go area near the summit -- is not legal and he will protest against it Friday.

The anti G20 demo has evolved into groovy house party on the streets of Hamburg - with fireworks, not cops now providing the bang pic.twitter.com/z9s3gpJcsG — Kara Fox (@karadaniellefox) July 6, 2017

G20 discussions to include climate change, migration

The G20, founded in 1999, meets each year. It includes 19 countries and the European Union and accounts for approximately 80% of global GDP. Around two-thirds of the world's population live in a G20 country.

During the two-day meeting, happening in German Chancellor Angela Merkel's birthplace, leaders are expected to discuss climate change, terrorism and migration.

Not every protester's focus was anti-capitalism.

Kurt, a 23-year-old from Western Germany who refused to give his last name, was demonstrating about climate change and called on Merkel's government to do more.

"In the struggle of climate justice, Germany is still missing its target," he said. "And the way the leaders present themselves is a theater now. Merkel can say Trump exited the Paris Agreement but Germany is still missing its target.

"This summit is a theater for the people at home. ... There's so much rotten in the system and there's so much wrong here still — if we don't leave debt for our children we will leave a dead planet for our children. That's not the alternative."

Elena P., 31 and an art therapist, said she was protesting for more freedoms for migration and stopping the flow of the arms trade.

"This is the real story behind all this capitalism," she said. "Merkel says she will protect migrants but at the same time we are selling weapons to the same places and countries who are committing crimes against the people who are seeking refuge in our country and across Europe."