Nigeria is recalling its top diplomats in South Africa because of "ongoing xenophobia targeting foreigners," said a government statement.
Seven people have been killed in the attacks in South Africa that began three weeks ago. Property has been destroyed and the violence "created fear and uncertainty in the minds of African migrants," said the Ministry of Foreign Affairs statement.
Nigeria's ambassador in Pretoria, South Africa's capital, and the consul general in Johannesburg, the economic hub, will return to Nigeria for consultations, said the statement.
The statement, dated Saturday, noted that some South Africans organized peace marches and that President Jacob Zuma condemned the attacks as did Zulu King Goodwill Zwelithini, whose comments allegedly incited the violence.
Nigerian legislators have called for the South African government to pay damages and a Nigerian rights group has complained to the International Criminal Court.
South Africa on Sunday criticized the Nigerian government's action as an "an unfortunate and regrettable step," in a statement issued by the Department of International Cooperation and Cooperation.
The South African government said it and a wide range of civic organizations had been "decisive and unequivocal in condemning and rejecting the attacks on foreign nationals" and that through its "interventions, relative calm and order has been restored."