Germany's interior minister said police had stopped a possible attack at a shopping center in the western city of Essen on Saturday and there were indications of a link to Islamic State militants, Reuters reported.
Germany is on high alert following deadly militant attacks in France and Belgium and after a failed asylum seeker from Tunisia drove a truck into a Berlin Christmas market in December, killing 12 people. Islamic State claimed responsibility for that attack.
Police closed one of Germany's biggest shopping malls on Saturday after security agencies warned of a possible attack and questioned two men in connection with the threat.
Interior Minister Thomas de Maiziere said there could have been an attack at the shopping center.
"That was stopped," he told public broadcaster ARD on Sunday, adding there was a connection to someone pulling the strings in Islamic State.
"There were indications or orders from someone who had traveled to the region (Syria) from Germany. That shows how close the connection is. So it is good that the federal and regional security authorities were vigilant," said de Maiziere.
Security sources told Reuters that the threat appeared to follow a call for violence by a German militant loyal to Islamic State who is currently based in a region of Syria controlled by the militant group.
He reiterated that the danger of a terrorist attack in Germany remained high. Officials are worried that Islamist radicals will return from Syria or Iraq to stage attacks on German soil.
Just over six months before an election, Chancellor Angela Merkel's political foes say her open-door migrant policy may have raised the risks.
Separately, German police said on Sunday they were questioning a man in his early 20s who was detained after an overnight operation in the southwestern town of Offenburg, near the French border, following a security threat.
Police said they believed one target of a potential attack was a night club. They added that no weapons were found during the operation and a second man who was arrested was later released.