Nigeria's President Muhammadu Buhari met with South Africa's President Cyril Ramaphosa amid the recent slew of xenophobic attacks, which has shaken the continent.
"We call for the strengthening and implementation of all the necessary measures to prevent the reoccurrence of such actions," he said.
Ramaphosa was also swift to condemn the violence, saying: "Early warning mechanisms will be set up so that when we see, there is restiveness in both of our people ... we will be able to inform one another."
He added: "We are equally committed to upholding the rule of law and ensuring that all those involved in criminal activities, regardless of their nationality, are prosecuted."
The meeting comes weeks after the Nigerian government began evacuating hundreds of its citizens from South Africa.
"We have 640 Nigerians that want to come back from South Africa, and that will require two planes. There may be more people who want to leave, but we will know when we get to South Africa on Wednesday," said Abike Dabiri-Erewa, chairwoman of the Nigerians in the Diaspora Commission last month,
The decision to send Nigerians back to their home country follows riots in Pretoria and Johannesburg, where at least 12 people were killed, and as many as 1,000 foreign-owned businesses were targeted. According to reports, Nigerians, Ethiopians, Congolese, and Zimbabweans were targeted.
"While there has been a significant decline in the number of incidents, police forces remain on high alert and are closely monitoring hotspots to ensure further violence does not erupt," Minister of Defence Nosiviwe Mapisa-Nqakula said.
Police have arrested more than 650 civilians in relation to the xenophobic attacks. Many are reported to be citizens of South Africa.