Misleading social media posts about the anti-migrant violence gripping South Africa have been spreading across the continent, fuelling tensions that have already sparked reprisal attacks in Nigeria.

Some posts purporting to show the violence contain old images, or footage from a different country altogether.

Tens of thousands of Facebook and Twitter users have watched videos showing people frantically jumping out of a burning building.

If the captions are to believed, the footage shows the deadly violence in Johannesburg.

In fact, it was not filmed in South Africa at all, but in India.

It shows a horrific fire in the western Indian city of Surat, which killed 20 teenagers last May.

The attacks on foreign-owned stores in South Africa have prompted fury in the continent’s other major economic power, Nigeria.

South African businesses have been targeted in reprisal attacks in Nigerian cities, and South Africa on Thursday shut its diplomatic missions in Lagos and Abuja as a security measure.

Nigerians have taken to the internet to express anger over the violence, with Femi Fani-Kayode, a former aviation minister and prominent commentator, whipping up fears about the “mass murder of Nigerians”.

On Monday, Fani-Kayode posted a Facebook video showing what he said was a South African minister “subtly trying to justify the killing of Nigerians”.

While the video did show former deputy police minister Bongani Mkongi complaining about immigration, it was filmed back in 2017 and Mkongi is no longer minister.

Nigerian Foreign Minister Geoffrey Onyeama on Wednesday warned that misleading social media posts were fanning the tensions, stressing that no Nigerians are among the seven people killed.

“No Nigerian life has been lost during this crisis,” he told reporters.

“And I think that is very important because on social media, there is a lot of stories going around of Nigerians being killed, jumping off buildings and being burnt. This is not the case.”

He added: “What we know in that premises, shops of Nigerians have been looted and property destroyed.”

South Africa has suffered repeated waves of xenophobic unrest in recent years, fuelled by accusations that migrants from other African countries take up scarce jobs.

Since the unrest broke out on Sunday, various images showing similar attacks in previous years have begun surfacing again online, in posts claiming that they show the current situation.

They include an AFP photograph taken during a confrontation in Johannesburg in April 2015