More than a million people fleeing war and poverty in the Middle East, Africa and elsewhere arrived in Germany last year. The mood towards them has soured after a spate of attacks on civilians last month, including three carried out by migrants.
Two of those attacks were claimed by the Islamic State militant group.
“The phenomenon of Islamist terrorism, of IS, is not a phenomenon that came to us with the refugees,” Merkel said at an election campaign event for her Christian Democrats in the eastern state of Mecklenburg-Vorpommern ahead of a regional vote on Sept. 4.
Merkel said many people had traveled from Germany to Syria for training with Islamist militants. In June Interior Minister Thomas de Maiziere said a total of more than 800 were believed to have gone to Syria and Iraq.
“This group has worried us for several years,” she said at the event in Neustrelitz, a town 100 km (60 miles) north of Berlin.
Merkel’s popularity has suffered in the wake of the attacks and 52 percent of Germans think her migrant policy is bad, a poll published last week showed.
The influx of migrants, many of whom are Muslim, has boosted support for the anti-immigrant Alternative for Germany (AfD), which is expected to perform well in elections in Mecklenburg-Vorpommern and Berlin.