He was intensively observed and “everything that is possible to do has been done,” a security expert told the German Press Agency (DPA).
“We were faced with a very serious threat, which we approached with vigilance,” added interior minister of Baden-Württemberg, Thomas Strobl.
The 29-year-old suspect, a German national born in Freiburg, was believed to have scouted the target – the area around an ice rink – in Karlsruhe in August and allegedly tried to get a delivery driver job in preparation.
“The accused, Dasbar W., is strongly suspected of having supported Isis and being a member of Isis”, German anti-terror prosecutors said in a statement. He is “strongly suspected of plotting a violent action.”
The man was to be brought before the Federal Court of Justice (BGH) on Thursday.
The prosecutors said that between April and July 2015 W. disseminated Isis propaganda videos online. That same year he left Germany for the first time to travel to Iraq, returning home in March 2016.
He made a second trip in June 2016 during which he pledged allegiance to Isis and underwent weapons training before coming back to Germany in July 2017.
His arrest came the day after the first anniversary of the Christmas market attack in Berlin that killed 12 people and wounded hundreds.
Rejected asylum seeker Anis Amri, a Tunisian, ploughed a truck into the market on December 19th, 2016 before being shot dead while on the run days later in Italy.
In a recent interview, German domestic intelligence chief Hans-Georg Maassen said the country was not immune from a new attack, with some 1,900 individuals in Germany suspected of having ties with jihadists.