He lives about 45 minutes outside Macerata in a sparsely furnished room a short walk from a soccer field that was an internment camp for 61 Jews in World War II. The first time he saw Macerata, he said, he was struck by how clean it was. He shopped for red palm oil and talked to friends in the African shops. Now he avoids it.

“I crossed the Sahara and the Mediterranean,” he said. “And this happened to me in Europe?”

Europe’s history is bloody and the idea of it as a haven is relatively new. But people forget.

On April 25, the Italian holiday commemorating the end of Nazi occupation, a handful of army veterans saluted the fallen soldier at Macerata’s crater-shaped Monument of the Resistance. Mr. Carancini, wearing a tricolor sash, urged the crowd not to forget Italy’s Fascist past.

“This territory in particular is living a moment of great difficulty, uncertainty and precariousness,” he said.

The ceremony ended, the crowd broke up, and some wandered past newsstands selling local papers headlined “Pamela: Torture and Crime, The Secrets of the Nigerians.” At Piazza Vittorio Veneto, volunteers offered lunch for 200 residents and migrants. A priest handed out prayer cards quoting Pope Francis: “We are all migrants.”

Mr. Diallo, the Senegalese man who had practiced his Italian verbs at the Caritas center, laughed with friends as they ate African and Italian specialties. Tiziana Manuale, who managed the center, sat nearby. Many people at the lunch would be forced to leave, she said.

“There was the notion that Macerata is a welcoming city,” she said. “But some parts of the population aren’t ready.”