"The most devastating legacy of European control of Rwanda was the transformation of social distinctions into so-called 'races'. We were classified and dissected, and whatever differences existed were magnified according to a framework invented elsewhere […] The colonial theory of Rwandan society claimed that hostility between something called 'Hutu', 'Tutsi', and 'Twa' was permanent and necessary."

Today, it seems obvious that the murder of 800,000 people is not an overnight event but rather the result of deliberately cultivated hate over a lengthy period. It begins with the classification and dehumanisation of people and communities, with differences magnified according to frameworks invented elsewhere and leads to "permanent and necessary" hostility, and eventually, disaster.

These are important lessons for the rest of the continent. They are particularly relevant for Kenya today.

Following a series of terrorist attacks across the country, the government has launched a crackdown on supposed criminal and terrorist elements, but one which actually seems to target the country's minority Muslim and Somali populations. As the country marks a year since the swearing in of President Uhuru Kenyatta, the venue of his inauguration - Kasarani Stadium - has been playing host to thousands of almost exclusively ethnic Somalis who have been arrested for not producing proper identification documents.

For many of them, officially sanctioned harassment is nothing new. For the last half-century, Kenyan authorities have treated Muslims and ethnic Somalis with suspicion, seeing them at best as just short of being Kenyan and at worst as a fifth column - the enemy within. In fact, as an essay by Professor Jeremy Prestholdt of the Department of History at the University of California, San Diegostates: "The government of Kenya's antiterrorism initiatives have compounded an already deep sense of alienation among those most severely affected by the new measures: Kenyan Muslims, particularly those of Arab and Somali ancestry."

Al Jazeera Correspondent - Not Yet Kenyan

In colonial times, their status as native Africans was at best ambiguous and in the run-up to independence, a push towards greater autonomy at the coast and the desire of the Somali population in then Northern Frontier District to join Somalia, heightened perceptions of these communities as traitors to the Kenyan cause. The paranoia of the upcountry elites who took over from the British simply served to reinforce these views.

As the report of the Truth, Justice and Reconciliation Commission showed, for most of independent Kenya's history, the government has systematically marginalised and oppressed these populations. Its policy towards them has been one of demonisation and collective punishment. It is a history replete with rape, massacres and other human rights abuses, one in which the differences magnified according to frameworks invented elsewhere became defining features of a "permanent and necessary" hostility. It has to be noted that the same treatment, though not necessarily to the same extent, was meted out to other communities, such as the Luo, who were also perceived as a threat to the Old Establishment.

Seen within the context of this history, the current administration's actions are perhaps not surprising. Today the language of counter-terrorism is being employed to continue this tradition of dehumanisation and delegitimisation. It is a tradition that allows "Kenyans" to identify with the tragedy and triumph of baby Satrin Osinya while remaining blind to the suffering of Somali infants spending their nights in police cells. "Refugee" has been made synonymous with illegality and terrorism, with a status undeserving of rights. Like the Kenyan Somalis and the Muslims of the coast, their presence has been shown to be merely tolerated rather than accepted, and deeply suspect to boot.

In these populations, as marginalised at the centre as they were in the periphery, the government has found a convenient scapegoat for its failures. According to a report titled Kenya and the Global War on Terror by Samuel Aronson of the London School of Economics, "The current anti-terrorism strategy in Kenya neglects the history and geopolitics of the nation and is thus flawed in its most basic capacity." But I think the reality is a lot more sinister. The government doesn't ignore this history. It exploits and fortifies it.

What it deliberately ignores is that "Wahhabism is being rejected by most Kenyan Muslims and that of the roughly 200 mosques in Mombasa, 'maybe five [can] be considered extremist'". What it is unwilling to acknowledge is "the difference between radicalised terrorists and theologically conservative Muslims", or that "the predominantly Sunni coastal population takes issues with Shia and Wahhabi foreigners who, according to many on the coast, lure the 'lesser educated and financially needy Africans away from the true faith'". It is more convenient to believe "the coastal [and Somali] population is mainly terrorists".

That makes it easy to distract from the real failures - corruption and incompetence. Counter-terrorism efforts have been more about racial profiling and less about intelligence gathering and actual police work.

But worse than that, by following in the footsteps of previous regimes, the government not only makes us all less safe, it perpetuates the very logic of exclusion that led to the terrible events in Rwanda 20 years ago.

Patrick Gathara is a strategic communications consultant, writer, and award-winning political cartoonist based in Nairobi.