Riot police uses tear gas against people in the Schanze district following the G20 summit in Hamburg. REUTERS/Kai Pfaffenbach

BERLIN (Reuters) - The mayor of Hamburg, Olaf Scholz, apologized to his city’s residents on Wednesday over violence that marred a summit of world leaders from the G20 group of countries last week.

About 20,000 police struggled to contain several hundred anti-capitalist militants who torched cars, looted shops and hurled Molotov cocktails and stones during the July 7-8 summit. Tens of thousands more people demonstrated peacefully.

Scholz, a senior Social Democrat who had been seen as a potential future party leader before the summit violence, said it had not been possible to ensure security everywhere in the city at all times during the summit, adding:

“For what happened, I apologize to the people of Hamburg.”

Hamburg’s dense, urban environment allowed the 1,000 hard-left militants who wreaked havoc on the city’s streets to disperse and hide easily.

Scholz, who has faced calls for his resignation from members of Chancellor Angela Merkel’s conservatives in Hamburg, blamed the violence on a ‘criminal mob’, which he said wanted to injure and kill people.

“I am pleased nobody died,” he said.

Overall, 476 police officers suffered injuries ranging from cuts and firework burns to eye damage from laser pointers. Police said on Sunday they had arrested 186 people and taken 225 into custody.