Since last year, the school has run an intensive language course for newcomers. For four hours every morning, children learn German, then are integrated into regular classes for the rest of the day. The most recent additions are two Syrian sisters, Sabah, 7, and Arzo, 8, who three weeks into the term can already name vegetables and fruit and answer basic questions in German.

Not all are happy with the attention and resources dedicated to non-Germans, inside and outside the school, Ms. Iffarth said. Those granted asylum in Germany get an apartment, health insurance, a language course and 399 euros (about $450) a month. Many in the neighborhood are unemployed and have problems of their own. “We fail to integrate the losers in our society, and then we ask them to integrate the refugees,” she said.

Mr. Hennig, the social worker at the brothel-turned-asylum home, had to unfriend some of his relatives on Facebook because they were calling the migrants parasites. It makes him angry. All the migrants he has met want to learn German and work as soon as possible, he said.

One of them, Shyar Ibrahym, 34, a car mechanic and Kurdish refugee from Aleppo, Syria, wore a German soccer shirt on his second night in Erfurt. In his first-floor room, which he shares with three others, a German flag adorns the wall. His friend Othman Othman was registered as “Assmann Assmann” by immigration officials. No matter.

“I love Germany,” Mr. Ibrahym said. “I will be a good citizen.”