Nigeria said two of its citizens were killed in South Africa, one of them by police, during a surge in anti-migrant violence, and threatened to take unspecified action if authorities did not address the situation.
There was no immediate response from South Africa's government, which has contested some similar accounts from other countries. The main police watchdog said it was investigating the report.
Nigeria's Foreign Ministry said on Sunday one man was killed in front of his shop in the northeastern city of eMalahleni by unidentified criminals.
It gave no more details on the incident, which it said took place on Sunday, June 28, on a weekend when tensions were building up ahead of nationwide anti-migrant rallies last week.
The Nigerian ministry said another man, Emeka Iroegbu, was killed by police officers in Pretoria during an interrogation the same day. It did not say whether the incident was linked to the unrest.
South Africa's Independent Police Investigative Directorate, an oversight body, said it had received a report on the incident last week. "Our investigation is underway," the body's spokesperson, Lizzy Suping, said on Monday.
South Africa deployed its army to bolster security during the protests, which were mostly peaceful but at times turned violent.
Vigilantes have attacked foreign nationals and looted foreign-owned shops on numerous occasions in the last few months, as South Africans blame immigrants for problems such as crime and unemployment. Migrant rights groups say foreigners are being used as scapegoats for deep-rooted problems.
Mozambique said that five of its citizens were killed in xenophobic attacks in late May. South Africa said the number was only two.
Ghana said last week one of its citizens was fatally wounded in a shooting during the anti-immigrant demonstrations. South Africa said his killing was not related to the protests and accused Ghana of spreading misinformation.
South Africa president condemns attacks on migrants
South Africa's President Cyril Ramaphosa has condemned the attacks against migrants. Police said they arrested 900 people during last week's protests.
Nigeria's foreign ministry said on Sunday: "We wish to place the Government of South Africa on notice that if the situation continues to persist, all options remain on the table, some of which will be activated if the uncultured and provocative trend of intolerance... against foreigners is not addressed."
"The continuing pattern of such terrible incidents is clearly evidence of complicity on the part of security operatives... which raises the question of state responsibility under international law," the ministry added.