South African police have detained more than 30 people as a wave of violence against Africans and other immigrants spread to Johannesburg.
The xenophobic violence that erupted in the country's eastern port city of Durban several weeks ago has so far left at least six people dead and displaced thousands.
Overnight, small groups attacked shops in several areas around Johannesburg, police said.
"More than 30 people were arrested last night. At this stage the situation is calm but we plan to increase our deployment," a police spokesman said.
Police had to use rubber bullets to disperse looters in Alexandra, an impoverished township north of the city.
Several thousand foreigners have fled their homes to shelter in makeshift camps amid the violence, and neighbouring Zimbabwe, Malawi and Mozambique announced plans to evacuate their citizens.
President Jacob Zuma has cancelled a state visit to Indonesia to deal with the situation.
The latest outbreak of anti-foreigner violence in the country has been largely blamed on a speech last month by King Goodwill Zwelithini, traditional leader of the Zulus, in which he blamed foreigners for South Africa's high crime rate and said they must "take their bags and go".
The king has since said his words were misinterpreted, but for some, he simply articulated what many were feeling.
This is not the first wave of anti-foreigner violence in South Africa.
In January, foreign shopkeepers in and around the vast township of Soweto, south of Johannesburg, were forced to flee and six were killed as looters rampaged through the area.
In 2008, 62 people were killed in xenophobic violence across the city's townships.