Why is a cheeky Nando's ad from 2012 popular again?

"You know what's wrong with South Africa?" a voice intones. "All you foreigners."

This is how an advert for a South African restaurant chain begins. "You must go back to where you came from," the voice continues. And with that, migrants start to disappear in puffs of smoke.

At first, the ad from chicken restaurant Nando's seems provocative - if not downright racist - but it's actually the opposite of a xenophobic rant. At the end a chipper voice proclaims: "Real South Africans love diversity," before plugging a couple of new dishes on the menu.

Nando's is a worldwide brand, but it began in South Africa and this ad is suddenly popular again because of recent events in the country - even though it was shunned by TV stations when it was first released.

The YouTube video has been watched hundreds of thousands of times this week in the wake of violent anti-immigrant attacks in several South African cities. But it actually has nothing to do with recent events. It was first released three years ago, when several television stations including the state-owned South African Broadcasting Corporation refused to run it:

Image copyright Nando's
Image caption The advert starts by showing African migrants sneaking across the South African 'border'. 'You must all go back to where you came from' says the voiceover
Image copyright Nando's
Image caption Poof! The immigrant goes up in smoke
Image copyright Nando's
Image caption Cameroonians, Congolese, Nigerians ... all start to disappear
Image copyright Nando's
Image caption As for Europeans ...
Image copyright Nando's
Image caption ... they're gone too
Image copyright Nando's
Image caption No prizes for guessing what happens to this Afrikaner - a descendent of Dutch settlers who first arrived in South Africa in the 17th and 18th centuries. He's gone along with black Africans who migrated south before European settlers.
Image copyright Nando's
Image caption Finally there's only one person left, a Khoisan man who says: "I'm not going anywhere." The Khosian - who used to be called "Hottentots" or "Bushmen" - are thought to be the original inhabitants of the southern tip of Africa
Image copyright Nando's
Image caption Although what diversity has to do with chicken and chips is left somewhat unclear

The video has been watched more than 1.7m times in total, with more than 4,000 viewers giving it a thumbs-up.

"Best advert in SA, considering what's been happening lately," said Mcebisi Ngcobo.

"Xhosa people stay right?" said Sipho Mlanjeni. "No sorry Sipho," came the reply, "we all have to go."

A few read a less edifying subtext to the pro-diversity message. "Wise up black South Africans. This emphasis of 'Khoisan' as the true owners of South Africa is just another ploy to justify white occupation of African lands," one commenter said. "Basically what they are telling you is that all those large tribes e.g Xhosa and Zulus do not have claim to that land because after all it was appropriated from the Khoisan."

But most viewers seemed to think the ad's message was sorely needed in a country where at least seven people have been killed and 5,000 have been left homeless in the latest bout of anti-immigrant violence. South Africans - and those outside the country - have been involved in a huge online discussion over the attacks, with hashtags such as #SayNoToXenophobia and #XenophobicSA being tweeted hundreds of thousands of times in recent weeks.

"[South African President Jacob] Zuma himself should grant this ad airtime on our national television, never have we needed an ad more!" commented one.

Nando's specialises in spicy Afro-Portuguese peri-peri chicken. It has more than 1,000 outlets and is a familiar presence across Africa as well as in the UK, Australia and many other countries. The company has a history of controversial advertising in its home market - in the past it has made adverts of debatable taste about dictatorship, women with large breasts, wealthy politicians and polygamy (the last thought to be a dig at Zuma, who has four wives).

The company's also not shy about making tenuous links between chicken and the politics of its home country - for example on Monday it's offering South African customers a meal for 19.94 rand to celebrate Freedom Day, which commemorates the country's first post-apartheid elections in 1994.

Mike Cathie, the chain's chief marketing officer for southern Africa, says the company has never been afraid of pointed comment.

"When this advert was made three years ago, there was a real sense that people wanted to speak out against xenophobic attacks," he told BBC Trending. "The vast majority of South Africans are fully aware of the huge contribution that immigrants have made to the country, and most of us were immigrants at one stage or another. That's a point of view that's resonating again."

He said the company's not too concerned about negative comments or the perils of stepping into politics. "There's always going to be people who disagree, but we love that. What we love just as much as people giving a voice, is stating a debate," he said. "We hope this really starts people thinking and maybe understanding a bit more about the issue."

Blog by Mike Wendling

Related from Trending: Why other Africans are calling South Africa 'xenophobic'?

Follow BBC Trending on Twitter @BBCtrending, and find us on Facebook.