One of my favourite passages in Nelson Mandela's autobiography Long Walk to Freedom is the section where he describes being smuggled out of South Africa to visit a series of African countries and seek support for the armed struggle in his home country. Over a number of months, Mandela would receive travel documents from Tanzania and Ethiopia which enable him to go to 13 countries and meet leaders from another four.
The material support for the African National Congress (ANC) and its armed wing, Umkhonto we Sizwe, was significant, but so too was personal support for Mandela and his entourage. For example, Sekou Toure, then president of Guinea, on hearing that the men were low on funds after so much travel, sent two large suitcases of money for their personal use. It was Guinean money, so not much at all, but enough to tide them over until their next destination.
This short sequence has replayed in my mind periodically over the last few weeks as news comes in of another rash of xenophobic attacks in South Africa. Since the beginning of September, at least 12 people have died as armed groups raided foreign-owned businesses in parts of Johannesburg and Cape Town.
While foreigners are the primary targets, South Africans have not been spared. World-renowned musician Yvonne Chaka Chaka tweeted that her daughter's shop had also been damaged in the melee. She is one of the bestselling South African musicians of all time.
To me, all this raises questions about a combination of moral and political obligations that are unique to the postcolonial/post-apartheid state.
For those of us who considered ourselves part of South Africa's anti-apartheid struggle, the ambivalent response from South Africa's political leadership - with some notable exceptions - sounds like a betrayal of the solidarity and support that was given to the ANC and the Pan Africanist Congress of Azania (PAC) during the worst years of apartheid.
Naledi Pandor, the minister for foreign affairs, claimed many Nigerians in South Africa are involved in drug and human trafficking and requested the Nigerian government's help in keeping Nigerian "criminals" in Nigeria. Thabo Mbeki, who himself spent part of his time in exile in other African countries, echoed the sentiment.
Only Julius Malema, a leader of the Economic Freedom Fighters (EFF) opposition movement, has gone on record rejecting any equivocation when it comes to stopping attacks on African foreigners. Yet, where would South Africa be if thousands of ANC and PAC exiles had not been welcomed across Africa during the struggle?
One notable aspect of the violence to me concerns the location of many of these attacks, and what it says about the status of decolonisation in South Africa. Many have centred on the central business districts (CBDs) of large towns like Johannesburg, which were formerly the showpieces of apartheid's illusion of prosperity but are today somewhat abandoned and falling into disrepair. This cycle of abandonment and violence echoes a familiar pattern faced by former settler colonies.
As in other settler colonies like Kenya or Zimbabwe, the CBDs in South African cities were historical epicentres for colonial and racial violence. In fact, Nairobi's apartheid legal structure borrowed directly from South Africa, declaring that the CBD was "the natural domain for the European" and that non-Europeans could only be present with explicit permission from their European "master".
In the townships and reserves, apartheid focused on engendering fear and enforcing cantonment, creating a pool of labour for farms and industries. In the CBD, it focused on restricting freedom of movement through arbitrary arrests and detentions, and violent enforcement of the dreaded pass laws to maintain an enclave of white prosperity.
In his biography, Mandela writes about the many people in Johannesburg's CBD who refused to rent him offices for his legal practice. The prosperity of the CBD was predicated precisely on the exclusion and ritual humiliation of black bodies.
As in cities like Nairobi, the CBD in Johannesburg was abandoned after independence, and there was a mass exodus to nearby, newly built suburbs. This echoes the experience of US cities like Detroit and Cleveland, where formerly prosperous city centres crumbled because that prosperity could not survive desegregation.
That prosperity existed precisely because restricting the movement, association and occupation of non-white residents meant that economic resources could be focused on the white population, and an economic underclass could be effectively exploited by keeping them afraid.
Urban planners call the exodus after desegregation or independence "white flight". After white people who formerly made the main tax base in the segregated cities left the urban centres for racially homogenous suburbs, cities would shift planning focus to those suburbs and deprive the formerly prosperous CBD of key resources.
Thus, in South Africa, the rise of Sandton and Rosebank in Gauteng comes at the expense of the Johannesburg CBD. And after the white flight, the resulting resource vacuum subsequently contributes to the decay of the CBD, including an uptick in crime.
Similarly, the deterioration of what used to be a symbol of national prosperity then becomes associated with the idea that black people are spoilers and cannot govern effectively. This continues the exodus, as wealthier non-white communities also abandon the CBD, and in the extreme as in Johannesburg, property values and social services collapse completely.
It makes sense that the CBD would be a primary site for xenophobic violence in South Africa. Unless closely monitored and addressed, the transformation of the CBD in the settler colony in the post-colonial state is always accompanied by violence that replicates the contours of colonial violence.
As I point out in my book "Digital Democracy, Analogue Politics: How the Internet Era is Transforming Politics in Kenya", the historical racial violence of Nairobi's CBD is still regularly meted out against women because in Nairobi African women were not allowed to live in the CBD until the sunset years of the colony. Women who defied this rule were all labelled prostitutes - some were, many were not - and were punished for that.
Today, when women are victims of violence in the CBD, it is telling that most are accused of behaving "indecently" and the victims are routinely called prostitutes, intruding on a historically male-dominated space.
In South Africa, foreigners occupying the vacuum created by the retreat of the state become the focus of violence because they are portrayed as having interrupted the black succession of a prosperous CBD and having caused the deterioration of the space. The argument goes that the exclusion of black South Africans from the CBD was supposed to have ended after the fall of apartheid; instead a new type of foreigner is standing in between the attackers and that fantasy.
The same violence that treated black South Africans as intruders in a "naturally white" space, is visited on "intruding" foreigners. This is the argument that policy makers endorse when they imply that excluding foreigners from South Africa will resolve crime and violence in the cities their policies abandon.
Of course all this is an illusion. Excluding foreigners who are working and contributing to the economy will not resolve the broader economic issues - it may compound them. Yes punishing criminals - South African or otherwise - for crimes is the natural role of the state, but labelling all migrants criminals and excluding them wholesale will not resolve the policy failures that are stalling South Africa's decolonisation process.
Immigrants did not cause the decay of Johannesburg's CBD. It occurs because cities mistakenly believe that the illusory prosperity of the CBD will sustain itself after desegregation, when in fact, even more resources and an actively managed, postcolonial transition is needed.
Poor immigrants, documented or undocumented, are occupying the vacuums that arise when urban planning does not decolonise the city properly.
Violence is embedded in the DNA of the postcolonial CBD, and to move away from it, an administration must pay systematic attention to the resource reallocation at independence. The fact that the CBD in Nairobi and Harare survives white flight while Johannesburg struggles is testament to how pervasive and insidious apartheid in South Africa was. The scale of the system was immense, and its aftermath will be too.
And while observations about the postcolonial CBD do not speak to all of the social issues around xenophobia in South Africa, they do point to the hollow solutionism of South African leaders blaming African foreigners for state and policy level failures.
They also hint at another set of questions, including why the economic system sees black foreigners as a threat while white foreigners are seen as "investors" regardless of how many resources they bring to the table and the points at which they enter the economy. There is a legacy there that must be addressed much more comprehensively than simply declaring that African foreigners are criminals and must leave.
Certainly, South Africa does not have to accept everyone who tries to enter the country, simply because those countries once helped in the anti-apartheid struggle. But there is a moral obligation for policy makers to read history closely and interrogate their responses to the crisis further.
Indeed, the great tragedy of erasure and cooptation of Pan Africanism is that we now have at least two generations that do not remember or believe in the promise of transnational liberation solidarity on the continent. It is worth noting that elsewhere in his book, Mandela wrote, "many people have painted an idealistic picture of the egalitarian nature of African society, and while in general I agree with this portrait, the fact is Africans do not always treat each other as equals".
The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial stance.