Xenophobia flourishes in Africa too, encouraged by state-building.
It is not only in the West that black people are subjected to racism and abusive languages by the host nation's population as "bloody foreigners", "parasites", "aliens","refugees", etc, but also Africans living in other African countries are grimly accustomed to the same abusive language. Matters have sometimes been getting out of hand in recent years. There is an irony that this is happening when many countries in Africa are busy trying to organise a Union of African states to replace the useless, that the OAU has been.
A few years ago, tens of thousands of Eritreans and Ethiopians have been expelled against their will when the two countries started war (May 1998 till June 2000). The Eritreans and Ethiopians who happened to be respectively living in each other's country had lived there for most of their lives, in some cases many of them didn't know their country of origin. The rulers of both sides accused each other, accurately, of human rights violation.
The reasons for these mass expulsions and violence are almost always the same in each country. "Patriotic” citizens are quick to assert, nationalistically, that the "outsiders" have come to take over their resources, their jobs and what have you. However, though the grievances of the masses may be related to economic factors, it is unreasonable to blame it on their fellow poor workers.
In order to ward off unrest various tactics are employed by governments. One of them is creating divisions among the poor workers by, for instance blaming foreigners and whipping up nationalistic feelings. In response to the official propaganda, the masses who are hungry and illiterate are taken in by the government policy.
Since anger is emotional and overpowers reason, the least provocations can result in misdirected violence, usually manifested in riots. The violence is usually turned loose on the "aliens". This is the real cause of xenophobia: the rich pitting the poor against the poor.
In the past when Africa didn't have artificial boundaries such as there are today, wars and hatred were not as rife. Making up nations have taken a great deal of building. There is almost no nation-state that has not had its boundaries drawn in blood. America was built on the bodies of the native population. It is a process that continues today in Africa. The effort, though, has to be ongoing. States have required the use of an education system, to standardise learning, spread a national history and a sense of shared culture.
Language became a factor in establishing state power, and thus it became a factor in determining a "nation". It is no coincidence that nationalism is accompanied by a mania for classifying, delineating and defining people into categories. These practical considerations were made explicit by the Polish Nationalist Pilsudski, who observed that "it is the state that makes the nation, not the nation the state".
In order to enforce the new system of property over the whole range of its influence, the ruling class needed the state, and its legitimising ideas of nationalism and the nation. Culture resides in sets of ideas, values and practices that set out a sense of precedent, self and future possibility. Nationalism imposes the idea of the nation, complete with its inherent notions of territorial ownership and property, upon a culture, on the very self-image of the people within that culture.
The idea of "the nation" functions as supreme good, beyond the physical and mechanical functionings of the state, to which any cause may appeal. It is a fantasy which can be used to cover up for problems and contradictions in the practice of the state's daily life. Its function is to legitimise both the state and class rule, and sustain a large quantity of support, through workers who identify with the ideas of nationhood and believe themselves to be the same as, and have the same interests as, their masters.
Workers of course, do not share a common interest with their masters. It does not follow that if the "national wealth" increases, or if trade increases, or even if profit increases, that higher wages will be gained by workers. It might appear that workers and employers share a common interest. In fact the interest of workers is conditioned by the interest of the employer, in exactly the same manner as hostages held by a kidnapper: unless the kidnapper/employer, demands are met, they will not allow the hostage/workers to have what they need to live.
In the powerful nations, history becomes a means of winning popular emotions to the cause of stability. An influential and well funded nostalgia industry has long been used in these nations to persuade workers that there is something great about being the nation's subject.
The valid definition of a modern nation is a geographical and political area in which goods and services are produced for the sale on the market with a view to profit and with the general class division of ruling and ruled. And the fact that the majority of population owns little but its ability to work is evidence the working class has no common interest with the minority ruling class.