South Africa is on tenterhooks. The ashes of hundreds of businesses — local and foreign-owned — smoulder as the tides of violence and brazen criminality swell.

President Cyril Ramaphosa vowed to clamp down on the attacks in Gauteng.

Five deaths have been reported, police said, adding that 189 people had been arrested.

Ramaphosa said attacks on businesses run by “foreign nationals is something totally unacceptable, something that we cannot allow to happen in South Africa.

“I want it to stop immediately,” said Ramaphosa, adding that the violence had “no justification.”

The African Union and Nigeria have sounded their alarm.

Nigeria summoned its South African ambassador to express “displeasure over the treatment of her citizens” and dispatched a special envoy, who is expected to arrive later this week.

Several Nigerians used social media to call for a boycott of South African companies, including telecoms provider MTN, satellite television service DSTV and retailer Shoprite.

Separately, African Union chairperson Moussa Faki Mahamat condemned the violence “in the strongest terms” but said he was encouraged “by arrests already made by the South African authorities”.

David Makhura, the premier of Johannesburg’s Gauteng province, said rioting was not a solution.

“This issue can be dealt with without resorting to xenophobia,” Makhura told reporters.

“There is no country that does not have foreign nationals”.