South African President Cyril Ramaphosa told officials and business leaders on Wednesday that he was committed to quelling attacks on foreigners that have threatened to cast a cloud over an economic forum aimed at boosting intra-African trade.

Police have arrested almost 300 people and confirmed at least five deaths after riots in Johannesburg and the capital Pretoria in recent days, when roving groups attacked shops mainly owned by migrants from the rest of Africa.

It is unclear what ignited the latest round of violence, but analysts say contributing factors include high unemployment and frustration with limited economic opportunities.