A Tunisian man suspected of being a recruiter for Islamic State has been arrested in Frankfurt as authorities raided dozens of locations.
Tunisian officials also suspect the man of involvement in a deadly attack on a museum in his homeland in 2015, authorities added.
Frankfurt prosecutors said their investigation focused on 16 people aged between 16 and 46.
The main suspect, a 36-year-old Tunisian whom authorities did not identify, was arrested on suspicion of supporting a foreign terrorist organisation.
Investigators believe he had been a recruiter and smuggler for the IS group since August 2015.
They suspect he had built up a network of supporters with the aim, among other things, of carrying out an attack in Germany.
However, they say that plans for an attack were at an early stage and no specific target had been chosen.
The main suspect was in Germany from 2003 to 2013, then returned in August 2015 as an asylum-seeker, prosecutors said.
He was arrested a year later in Frankfurt because he had not finished serving a 2008 sentence for bodily harm.
Tunisia was also seeking his extradition at the time - the man was under investigation for alleged involvement in planning and carrying out the March 2015 attack on the Bardo museum in Tunis as well as a March 2016 attack on the border town of Ben Guerdane.
In November, he was released again because he had served his previous sentence and Tunisia had failed to provide full documentation to support his extradition within the required 40-day deadline, prosecutors said.
However, he was kept under round-the-clock surveillance until Wednesday's arrest.
Wednesday's raids covered 54 flats, business premises and mosques in Frankfurt and the surrounding region. Officials said the raids followed a four-month investigation.
In a separate case, prosecutors in Berlin said that they arrested three people on Tuesday night suspected of planning to travel to Syria or Iraq to undergo explosives and weapons training with IS.
All three were associated with the Fussilet mosque in Berlin, known as a gathering point for radicals, said Martin Steltner, a spokesman for prosecutors.
Berlin Christmas market attacker Anis Amri - a Tunisian whose asylum request had been rejected -visited the mosque shortly before his December 19 rampage in which 12 people were killed.