German authorities were considering measures to limit the right to demonstrate, after dozens of policemen were injured as a protest by far-right groups purportedly aimed against Islamic extremism turned violent.

North Rhine-Westphalia's interior minister said freedom of assembly was misused by neo-Nazi groups and members of Germany's football hooligan scene who held a rally in Cologne, western Germany, on Sunday 26 October.

"This was no political demonstration, but a platform for violence," Ralf Jager said, adding the protest should have been banned, The Local reported. "[We] must convince the courts to forbid such demonstrations in future."

The gathering in Germany's fourth-largest city drew more than 4,000 people - more than double the number initially expected - who came from all over the country to protest "against Salafists and Islamic State extremist".

Heavy drinking and anti-immigration slogans characterised the demonstration that soon got out of hand.

Drunk far-right fanatics clashed with riot police, who used water cannons and pepper spray to disperse the crowd.

Authorities said protesters overturned a police van and threw bottles, stones and fireworks at security forces, injuring 44 officers. At least 17 people were arrested.

Justice Minister Heiko Maas said all those involved in the violence will be duly prosecuted.

"Anyone who commits violence on German streets must be prosecuted and punished with all measures of the rule of law," he said.

The incident came weeks after anti-Isis protests organised by Kurdish nationals in a number of German cities erupted into violent clashes, with radical Muslims armed with knives and brass-knuckles.

Communal tensions have been on the rise in Germany in the wake of deteriorating security in the Middle East.

Home to approximately 4.5 million Muslims, Europe's largest economy has recently experienced a rise in asylum applications, partly because of the war in Syria.

Reports on home-grown radicals fighting with Islamic State jihadists have helped fuel far-right anti-immigration rhetoric.

Germany's domestic security agency said almost 400 German nationals have travelled to the Middle East to join the jihad.