South Africa has apologised to African countries after the xenophobic attacks flared again in the continent's largest economy, driving thousands of immigrants out of their homes.

International Relations minister Maite Nkoana-Mashabane met African diplomats in Pretoria on Friday to brief them on the situation and also to apologise for the violence.

Five people are feared to have died in the violence that has displaced thousands of foreigners.

It is therefore with a deep sense of pain and regret that we as the South African government humbled ourselves before the African diplomatic community

"We took the African diplomatic corps into confidence on the practical measures that are being taken by the security agencies to bring to justice those who are responsible for the violence and related criminal acts," Nkoane-Mashabane told journalists.

She said the South African government had employed several strategies to halt the attacks.

"It is therefore with a deep sense of pain and regret that we as the South African government humbled ourselves before the African diplomatic community in our meeting with them today; and we expressed, through them, our heartfelt apologies to the African continent and people for the actions of those of our citizens who have behaved in a shameful manner," Nkoane-Mashabane said.

President Jacob Zuma on Thursday had described the attacks against foreigners 'unacceptable' in a televised address.

Zuma also directed his security and economic sector ministers to take steps to prevent further attacks and devise ways of maintaining long-term peace and stability.

"Additional law enforcement officers have been mobilised from around the country and deployed to the affected areas to enforce the law and prevent further attacks," Zuma said.

Malawi and Zimbabwe have started evacuating their citizens and some African countries have also called for consumber boycotts of South African goods in protest against the attacks.

A possible boycott will hit the South African economy hard, as it is already struggling with sluggish growth.

Maite Nkoana-Mashabane said former United Nations High commissioner for human rights, Navi Pillay would lead a panel of experts to advise government on the integration of foreigners into the local communities to avoid conflict.

The violence that began in Durban a week ago has been blamed on a traditional leader who made inflammatory remarks against foreigners last month.

South Africa experienced similar violence in 2008, which left 60 people dead.