* Ramaphosa says xenophobia has traumatised country
* Nigerians quit WEF event over anti-foreigner attacks
* At least 10 killed in week of violence
* Ministers say South Africa working to tackle problem (Adds Ramaphosa, analyst)
By Wendell Roelf and Alexander Winning
CAPE TOWN, Sept 5 (Reuters) - South Africa promised on Thursday to tackle the prejudice fuelling a wave of deadly riots and xenophobic attacks, as international anger over the violence overshadowed a pan-African economic conference in Cape Town.
President Cyril Ramaphosa said at least ten people had been killed during the past week, of whom two were foreigners.
"Our country has been deeply traumatised ...by acts of violence and criminality," he said in a televised address. "There can be no excuse for attacks on homes and businesses of foreign nationals ... (or) xenophobia."
Ramaphosa had hoped the three-day World Economic Forum would serve as a shop window for his efforts to revive South Africa's ailing economy and boost intra-African trade.
But the violence, which has also led to hundreds of arrests and which government officials had until now largely blamed on criminals, has all but eclipsed those proceedings.
While the foreign victims' nationalities have not been made public, the rioting - and reprisal attacks - have above all exposed tensions between the host country and Nigeria, the continent's two biggest economies.
On Thursday Jim Ovia, chairman of Nigeria's Zenith Bank and a co-chair of the whole Cape Town event, withdrew, citing the "hypersensitivity of the issues surrounding the lives and well-being of Nigerian citizens living in South Africa."
Nigeria, whose vice president had boycotted the summit on Wednesday, also recalled its High Commissioner to South Africa.
Earlier in the day, Ramaphosa cancelled a scheduled appearance at a WEF plenary session to address a crowd protesting for a second day about violence against women.
He did address the summit in the afternoon but, flanked by several other African presidents, did not mention the anti-immigrant attacks, highlighting instead the need to root out corruption and strengthen institutions.
Walking out of a less than half-filled conference hall, he declined to be drawn on the impact of Nigeria's withdrawal as his security detail closed ranks and whisked him away.
Summit attendee Peter Attard Montalto, head of capital markets research at financial services research firm Intellidex, said that while private sector participation had been good, the government side "feels like a wasteland."
"That is obviously partly a function of the reaction to the xenophobic violence, but even the original guest list was not that big."
Earlier, on the sidelines of the conference, Foreign Minister Naledi Pandor acknowledged some of the rioting was being driven by "Afrophobia" - resentment of other Africans living and working there.
The government was working to restore calm and was in constant contact with Nigerian authorities. It would also look at school curricula to tackle "problematic attitudes", she said.
Finance Minister Tito Mboweni told the conference that politicians were partly responsible. "We have to go to our people politically to discuss what some of them are doing is wrong."
The riots began eight days ago in Pretoria before spreading to nearby Johannesburg. Both cities, in Gauteng province, have large immigrant populations.
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, he said that "has been taken to the pathologist."
South Africa also felt the brunt of reactions from abroad.
Tanzania's national carrier suspended flights from Dar es Salaam to Johannesburg, citing ongoing violence it said was a risk to its passengers.
South African soccer authorities said they had called off an international scheduled for Saturday against Madagascar after the visitors withdrew from the match.
In neighbouring eSwatini, the National Agricultural Marketing Board said trucks that normally carry farm produce south across the border were standing idle after advice from Pretoria counterparts that it was not safe to travel.
"We are keeping our fingers crossed that things will normalise by next week," said NAMBoard Agribusiness Manager Tammy Dlamini.
Official data on Thursday pointed to lingering economic weakness.
South Africa's trade balance swung to a deficit in the second quarter, while the current account deficit widened.
The economy grew more than forecast in the same period but it had contracted sharply in the previous three months, and the heads of two local financial firms said on Thursday that a meaningful recovery was years away. (Reporting by Wendell Roelf and Alexander Winning; additional reporting by Mfuneko Toyana, Tanisha Heiberg and Emma Rumney in Johannesburg, Felix Onuah in Abuja, Lunga Masuku in Mbabane, Stanis Bujakera in Kinshasa and Fiston Mahamba in Goma; writing by John Stonestreet and Andrew Heavens; editing by Olivia Kumwenda-Mtambo)