It was not entirely clear if all the immigrants left willingly for the detention centers, or if some were forced to leave. In a reconstruction of the days of violence, the police said they were protecting the immigrants against would-be assailants, at least one of whom brandished a pistol.

Some immigrants told the Italian news media that Calabrians had shot at them and beaten them with sticks in the riots, and a front-page editorial in La Repubblica on Sunday compared the situation to Ku Klux Klan violence in the United States in the 1960s. But other news reports said that many immigrants had fled their encampments in haste before the police began clearing them with bulldozers.

Image Africans work picking fruit in citrus groves in Calabria. Credit... The New York Times

Not all immigrants appear to have left the city, but those who are in the immigration centers with regular residence permits, or who had requested political asylum, are free to go, the interior minister, Roberto Maroni, said Sunday in a television interview. The others, he said, will be identified and deported.

The riots in Rosarno were a rare instance in which an entire city was engulfed by immigrant violence. In September 2008, Italy sent 400 members of the National Guard to Castelvolturno, outside Naples, after violent protests broke out over the shooting deaths of six African immigrants in clashes with the Camorra, the Neapolitan Mafia. Last February, immigrants set fire to the detention center on the island of Lampedusa, where many had been held awaiting deportation.

There are 4 million legal immigrants in Italy, out of a population of 60 million, and even more illegal immigrants. And while many Italians rely on them to work in their businesses and take care of their young children or elderly parents, many Italians see the new arrivals as a threat.

In television interviews, some Rosarno residents said they had lived peacefully alongside the immigrants and tried to give them work and food. But others were more hostile. “We’ve put up with them for 20 years,” one man shouted in a television interview on Sky TG24.