Some 7000 anti-capitalist protesters are expected to converge on Hamburg next month for the G20 summit and police are bracing for violence, a German security official says.
Leaders of the G20 leading economies will hold a July 7-8 summit in Germany's second-largest city posing a challenge for the 20,000 police officers who will secure the event.
Their task will be compounded by a planned demonstration against Turkish President Tayyip Erdogan by supporters of the outlawed Kurdistan Workers Party (PKK), the official added.
Turkish nationalists who support Mr Erdogan are also expected to hold a rival demonstration in support of the Turkish leader, raising the prospect of violence, the official said.
Police expect some 3000 pro-PKK activists and rival Erdogan supporters to show up in the city.
The Higher Administrative Court of Hamburg on Friday banned a camp that anti-capitalist protesters had planned to set up in a park in the city, using up to 3000 tents and offering beds and food to demonstrators.
The court ruled in favour of the City of Hamburg and police, who had rejected a request to set up the protest camp from June 30 until July 9.
Police will also have to secure the summit against a possible attack by Islamist militants.
US President Donald Trump, Russian President Vladimir Putin and Australian Prime Minister Malcolm Turnbull are expected to attend the talks.