Rioters looted shops and set fire to cars and buildings in the latest outbreak of violence against African immigrants in and around Johannesburg, South Africa’s largest city. The police said five people were killed and at least 189 arrested.

President Cyril Ramaphosa condemned the violence on Tuesday, calling attacks on foreigners “totally unacceptable” and adding that xenophobia was “something that is completely against the ethos that we as South Africans espouse.”

The violence on Monday night appeared to target shops owned by foreigners, said the mayor of Johannesburg, Herman Mashaba, and follows a spate of similar riots this year that have been part of a larger trend of hostility toward outsiders.

There are fewer than four million migrants in South Africa, a nation of more than 50 million. But attacks on foreign-owned shops have become regular occurrences that many have attributed to frustration with the country’s high unemployment rate, which sits at about 28 percent.