Analysts say that the public voiced little opposition after 5,000 Poles and 3,300 Americans, among other Westerners, emigrated to Denmark in 2014, but that there has been significant criticism of the nearly 16,000 Syrian asylum seekers who arrived that year and the next. They and other migrants were not invited, and many ended up here by accident, intercepted on their route to Sweden.

Critics complain that these newcomers have been slow to learn Danish — though the Immigration Ministry recently reported that 72 percent passed a required language exam. Some Danes bristle at what they see as ethnic enclaves: About 30 percent of new immigrants lived in the nation’s two largest cities, Aarhus and Copenhagen, where Muslim women in abayas and men in prayer caps stand out among the blond and blue-eyed crowds on narrow streets.

Perhaps the leading — and most substantive — concern is that the migrants are an economic drain. In 2014, 48 percent of immigrants from non-Western countries ages 16 to 64 were employed, compared with 74 percent of native Danes.

The Immigration Ministry has sought to avoid what it calls “parallel societies” of migrants living in “vicious circles of bad image, social problems and a high rate of unemployment.” Tightened immigration requirements, the ministry said in its latest annual report, weed out those “who have weaker capabilities for being able to integrate into Danish society.”

Omar Mahmoud, 34, an Iraqi engineer who entered Denmark a year ago and lives in a refugee center in Randers, a city of 60,000, is trying his best to fit in. He and his wife are taking Danish classes, and their three children are learning the language and making Danish friends in school. They are Muslim, but attend church to learn about Christianity, and he said he was not opposed to his son’s eating pork, a staple of the Danish diet, though it is forbidden in Islam.

Mr. Mahmoud said his family had not encountered direct insults or threats, but was frightened by the anti-immigrant and anti-Muslim tenor in the public discourse.

“It’s like foreigners are put in a special clan, separate from the Danish people,” he lamented. Still, Mr. Mahmoud said that “some of the Danish people are angels” and that he was relieved to be far from the violence of Iraq. “I’m in my heaven now.”