Johannesburg, South Africa (CNN) When I travel out of South Africa, I am often asked a version of the same question. "So, what will you be doing in Africa?"

The question usually comes with a slightly horrified look, or with genuine puzzlement. And it generally comes from South Africans.

As a South African, who has lived extensively overseas, that detached way of looking at the rest of the continent - and its people -- has often puzzled me.

This week at least 10 people were killed , and hundreds arrested in a spasm of xenophobic violence and looting in Johannesburg, Pretoria and elsewhere in the country.

Much of the violence and crime targeted foreign African migrants from countries such as Nigeria, Ethiopia, Zambia, and Kenya.

Of course, there is a difference between feeling separated from the continent and its people and violence against African migrants.

But is it part of a continuum?

South Africa's isolation

In an essay recently re-published in the influential blog Africa is a Country (the title is ironic), South African writer Sisonke Msimang writes about experiencing this geographic dissonance on returning from exile in the 1990s.

"In the early years after I got 'home,' it took me some time to figure out how to respond to the idea that Africa was a place that began beyond South Africa's borders. I was surprised to learn that the countries where I had lived -- the ones that had nurtured my soul in the long years of exile -- were actually no places at all in the minds of some of my compatriots," she writes.

She writes about the influence of apartheid on South Africa's physical isolation from the rest of Africa -- but also of the clear and sometimes real sacrifices that countries like Nigeria, Zambia and Botswana (to name just a few) made to isolate that racist regime and support the liberation movement.

A protestor gestures and holds a placard during a demonstration in front of the South African Embassy in Lusaka, Zambia on September 4, 2019

Msimang's essay was written back in 2014.

It is still relevant because, since the dawn of democracy here, the shame of xenophobia has happened in South Africa again and again.

And the toll of violence and hatred is devastating for its victims.

"They rob us over and over again"

When we met Hussein Osman before South Africa's election this year, he told us his shops in Soweto had been looted four times since fleeing violence in Somalia fifteen years ago.

"We live amongst South Africans and whenever there are elections, blackouts or no water they rob us over and over again," he said.

He said his grandson was killed during looting in August last year and his nephew was killed after being robbed just weeks before we spoke to him.

"I have lost hope since he died," said Osman.

JUST WATCHED Anti-immigrant sentiments peak in South Africa election Replay More Videos ... MUST WATCH Anti-immigrant sentiments peak in South Africa election 03:22

In a divided nation like South Africa, where racism is universally and rightly condemned, the prejudice against foreigners is out in the open.

I am often told by fellow South Africans that foreigners are to blame for crime, drugs, importing fake goods, taking people's jobs and their wives.

That casual xenophobia crosses racial lines and income brackets. And attacks on foreigners so frequent, they don't always generate headlines.

Diplomatic tensions

This week was different, in part, because of the swift reaction from Nigeria, Zambia and other countries.

Nigeria has recalled its ambassador to South Africa, while its citizens retaliated against South African owned businesses. Nigeria has also offered to repatriate its citizens, while Zambia and Madagascar canceled soccer matches with Bafana Bafana.

Students marched on the South African High Commission in Lusaka, and Ethiopia's foreign ministry said rioters destroyed South African owned businesses and a popular South African clothing chain was looted in the Democratic Republic of Congo Thursday.

After several days of incidents, South African President Cyril Ramaphosa did make a series of statements on his Twitter feed.

"The attacks on people who run businesses from foreign nationals is totally unacceptable," Ramaphosa said.

"There can be no justification whatsoever about what people are having a grievance over that they should go out and attack people from other countries because when they do so here, they should also know that fellow South Africans will be attacked in other countries," the President added.

Once a beacon of hope

But South African politicians, security chiefs and traditional leaders have, over the years, made contradictory statements about xenophobia. At times they have even incited the violence.

You get the sense that some South Africans don't take the calls for calm all that seriously, given the impunity of attacks.

Once, in the afterglow of Nelson Mandela, countries in the rest of Africa deeply admired South Africa. Now, they seem to have had enough.

In 1996, when South Africa passed its free constitution, then-President Thabo Mbeki gave his now-famous "I am an African," speech.

In his poetic terms, sometimes treated cynically in today's South Africa, Mbeki's speech was aimed at bringing together a fractured nation.

But he also spoke about the beacon he hoped South Africa would become for the rest of the continent.

"This thing that we have done today, in this small corner of a great continent that has contributed so decisively to the evolution of humanity says that Africa reaffirms that she is continuing her rise from the ashes," he said.

The beacon of South Africa has faded -- and much needs to be done to repair those bonds.