South Africa's government acknowledged on Thursday that prejudice was partly to blame for deadly rioting targeting foreign businesses, as those attacks and reprisals overshadowed a continental economic conference for a second day.

President Cyril Ramaphosa had hoped the World Economic Forum conference in Cape Town would serve as a shop window for his efforts to revive South Africa's ailing economy and boost intra-African trade.

But the backdrop of a week of anti-immigrant violence, during which several people have been killed and hundreds of arrests been made, has dominated proceedings.

Ramaphosa said on Thursday at least 10 people have been killed, two of them foreigners, in the wave of riots and attacks. Those numbers were less than previous reports, including a statement from a Johannesburg-area police official.

"Over the past few days, our country has been deeply traumatized and troubled by acts of violence and criminality directed against foreign nationals and our own citizens," Ramaphosa said in a televised address.

"People have lost their lives, families have been traumatized … We know that at least 10 people have been killed in the violence, two of whom were foreign nationals."

While the victims' nationalities had not been made public until Thursday, the rioting exposed dormant tensions between the host country and Nigeria, the continent's two biggest economies.

On Wednesday, South African companies MTN and Shoprite closed stores in Nigeria after retaliatory attacks, and threats of reprisals forced Pretoria to shut its embassy in Abuja, its foreign minister said.

Nigeria's vice-president boycotted the Cape Town meeting on Wednesday over the rioting.

There is a targeting of Africans from other parts of Africa, we can't deny that. - Naledi Pandor, South Africa's foreign minister

On Thursday, Jim Ovia, chairman of Nigeria's Zenith Bank and a co-chair of the whole event, also withdrew, citing the "hypersensitivity of the issues surrounding the lives and well-being of Nigerian citizens living in South Africa."

In Abuja, Nigeria's Information Minister Lai Mohammed said it was recalling its high commissioner to South Africa.

The riots began eight days ago in Pretoria before spreading to nearby Johannesburg. Both cities, in Gauteng province, have large immigrant populations.

A man stands by a bonfire during a protest on the road opposite Shoprite in Abuja on Wednesday. South African-owned businesses operating in Nigeria have been targeted with violence in retaliation for attacks carried out against Africans working in South Africa. (The Associated Press)

Police on Thursday reported 15 associated deaths since then, of which Gauteng police commissioner Elias Mawela confirmed seven were directly linked to the violence.

Police had also made 423 arrests. Asked about the victims' nationalities, Mawela said that "has been taken to the pathologist."

Repercussions across continent

Naledi Pandor, South Africa's foreign minister, said the government was aware of a resentment-driven "Afrophobia" and was working to restore calm. South Africa was also in constant contact with Nigerian authorities.

"There is a targeting of Africans from other parts of Africa, we can't deny that," she told Reuters on the sidelines of the conference.

"But, there is also criminality ... because a lot of this is accompanied by theft," she said, describing the attacks as a complex phenomenon whose root causes were not easy to define.

South African police, who have arrested hundreds in connection with the attacks, said they found two burned bodies on Thursday in the Gauteng township of Katlehong, one of the areas where rioting occurred. The incident could not be immediately linked to anti-immigrant violence, they said.

Some trade traffic was also affected.

In neighbouring eSwatini, formerly Swaziland, the National Agricultural Marketing Board said trucks that normally carry farm produce south across the border were being kept in their depot after advice from South African counterparts that it was not safe to travel.

"We have not been able to export since the week started… We are keeping our fingers crossed that things will normalize by next week," said NAMBoard agribusiness manager Tammy Dlamini.

Air Tanzania was suspending flights to Johannesburg, the country's transport minister announced on Thursday.

"You are aware that there is ongoing violence in South Africa whereby the youth have taken laws in their hands," Isack Kamwelwe told journalists in Dar es Salaam, Tanzania's largest city. "Due to that, we have decided not to transport passengers to the destination where their lives will be in jeopardy."

In the Democratic Republic of Congo's second city of Lubumbashi, residents protested outside the South African consulate and a South African-owned shop was looted, witnesses told Reuters on Thursday.