German police have launched a series of raids against alleged left-wing militants suspected of planning to disrupt a G8 summit next month.
Authorities are constructing a 12km (7.5-mile) security fence
About 900 police swooped on 40 sites across six northern states.
Prosecutors said the militants were suspected of planning fire bombings and other violent attacks.
About 100,000 protesters are expected for the summit of the eight rich nations in a hotel in Heiligendamm on the Baltic Coast from 6-8 June.
Authorities are constructing a 12km (7.5-mile) security fence to protect G8 leaders.
German Chancellor Angela Merkel will host the US, UK, France, Italy, Japan, Russia and Canada.
Climate change is expected to be a key issue, along with trade and African poverty.
The prosecutor's office in the south-western city of Karlsruhe said: "The suspects linked to the militant, left-wing extremist scene are accused of founding or belonging to a terrorist organisation whose aim is to disrupt or prevent the upcoming G8 world economic summit."
Germany is suspending the visa-free travel arrangements of 13 EU member states negotiated under the Schengen agreement around the summit.
Interior Minister Wolfgang Schaeuble said there was a clear security threat.
Anti-globalisation group Attac said the police raids were trying to "criminalise the entire spectrum of G8 opponents".
Another anti-G8 protester, Hanne Jobst, vowed his group would still "use the G8 summit to cast a spotlight on the injustices of this world".
Protesters have targeted a number of recent G8 summits, leading many to be held in remote or highly secured zones.