Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

HAMBURG, Germany — Violent clashes broke out near the site of the G-20 Summit Thursday as German riot police confronted thousands of protesters demonstrating amid the arrival of President Donald Trump.

In a protest that some called "Welcome to Hell," upwards of 10,000 people belonging to an array of anti-Trump and anti-capitalist groups — many wearing masks — attacked authorities, set fires, hurled rocks at officers and buildings, chanted slogans and touted angry banners as part of their efforts to disrupt the global conference set to kick off just miles away.

German riot police, in turn, attempted to disperse the protesters with tear gas, smoke bombs and water cannons.

At least 15 Hamburg police officers were injured in the melee after unruly crowds chucked stones and bottles at them, authorities said. Three officers were hospitalized, including one who suffered an eye injury caused by a firecracker that exploded in the officer's face.

Emergency personnel were also attacked, police in Hamburg tweeted, while other protesters were seen throwing stones and parts of scaffolding at various buildings, damaging storefronts and shop windows at a furniture store and a bank.

PHOTOS: ‘Welcome to Hell’ Protesters Clash on Eve of G-20

In addition, a small explosion occurred next to a truck with a water cannon. A car and other objects were also set ablaze, police said. Protesters damaged light posts, parked cars and construction sites, police added.

Dozens of medics were on the scene treating wounded protesters. Hamburg police, however, have not yet released official figures for the number of people injured or arrested.

Authorities also said they had shut down portions of the Hamburg public transit system as a precautionary measure.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Heavy riots in various areas of Hamburg. Currently no final numbers on arrests or injured.#G20HAM17 — Polizei Hamburg (@PolizeiHamburg) July 6, 2017

Protesters in Hamburg noted that the name for their demonstrations was an apt one.

"The demonstration's called 'Welcome to Hell' and I think it says everything," Nils Thiergarten, 21, told NBC News.

Others were more specific in explaining their outrage.

Protesters take part in the "Welcome to Hell" protest march on July 6, 2017 in Hamburg, Germany. Alexander Koerner / Getty Images

"I don't think it's fair that only 20 countries" — the wealthiest 20 on the planet — "are making all the economic decisions of the world," Eulalia Gomez, from Spain, said.

Some protesters were holding wine or beer, drinking casually while observing the chaos from the outer edge of the fray.

Hours after violence first broke out, police began directing peaceful protesters to distance themselves from the violent ones and also put out a message telling demonstrators that their organizers had cancelled the event.

By 10:30 p.m. local time, about 4,500 protesters remained near Hamburg's St. Pauli district, less than half the amount of the peak levels earlier in the day, police said.

But even after authorities in Hamburg, Germany's second-largest city, appeared to regain control in some areas, smoke and gas from the munitions used by police billowed through the air, creating an unsettling backdrop for the world leaders arriving for Friday's summit.

The chaos also marked a stark contrast to Trump's warm reception in Warsaw, Poland earlier in the day.

Protesters clash with riot police as they take part in the "Welcome to Hell" protest march on July 6, 2017 in Hamburg, Germany. Alexander Koerner / Getty Images

Trump, however, wasn't the sole cause of the demonstrations. Protests against the G-20 Summit typically occur every year, as anti-capitalists and anarchists seize upon the annual conference to express their views — sometimes violently.

Notable among the past instances of unrest were the riot outside the Toronto meeting in 2010 and the 2009 London summit protests that led to one death. In 2001, outside the G-8 summit in Genoa, one person was shot and killed while hundreds were injured.

Historically, host nations have held major international summits like the G-20 in areas of their country that can be easily shielded from demonstrators, but German Chancellor Angela Merkel chose to have it in the center of the populous northern port city.

Trump, meanwhile, kicked off his visit Thursday with a handshake with Merkel at a Hamburg hotel.

Merkel extended her hand first for the greeting and the two heads-of-state looked directly at each other during the shake.

Merkel and Trump then chatted while photographers snapped pictures.

In March, during a visit by Merkel to the White House, the two leaders shared an awkward exchange during which Trump seemed to ignore his counterpart’s offer of a handshake.

Ali Vitali reported from Hamburg; Phil McCausland and Adam Edelman reported from New York.