For months, the Kenyan security forces have been rounding up ethnic Somalis in Nairobi. This is part of a security operation (Operation Usalama Watch) which presumes that terrorists in Kenya are solely of Somali origin.
This presumption is wrong and is a clear manifestation of the decades-long discrimination of Somalis and other Muslims in the country. The discrimination plays into the hands of Al-Shabaab, which uses stories of Muslim oppression in Kenya to recruit members and justify attacks in the country.
Al-Shabaab's foreign operations arm is heavily populated by members of non-Somali ethnic background; this makes it operationally easier to insert these individuals into Al-Shabaab targets in neighbouring countries.
On 15th June, Al-Shabaab gunmen attacked the town of Mpeketoni in Kenya, killing around 60 people. The Kenyan government's initial response was, for domestic political reasons, to deny that Al-Shabaab had carried out the attack.
While the Kenyan government seemed to have been caught off guard and unprepared, Al-Shabaab had warned of an impending attack weeks before it took place.
In mid-May, the Emir of Al-Shabaab, Ahmed Godane (Abu Zubayr), called on Muslims in Kenya to rise up and fight the state. He also addressed the Kenyan government, saying that it had made a historic mistake by attacking Al-Shabaab territory in Somalia. This had led to insecurity in Kenya, the bloodletting of the Kenyan army and the resultant weakening of the Kenyan economy.
He continued, saying that Kenya should not do "a second stupid thing" by harming Muslim honour and blood in their country, because "The Westgate Operation is not far off from you".
This kind of pre-attack warning falls within the Al-Shabaab practise of publicly referring to such events before they take place. Abu Zubayr released audio messages warning of both the Kampala attacks in 2010 and of the Westgate attacks last year. The above message was a clear warning of an impending high casualty attack and of an escalation of the insurgency in the Somali part of Kenya.
On 19th May, Al-Shabaab ambushed Kenyan troops near Mandera inside Kenya, taking light arms and vehicles from security forces. Following the ambush, on 20th May Al-Shabaab spokesman Sheikh Ali Dhere said that the Kenyans would be spared attacks in their country if they withdraw troops from Somalia: "your safety depends on our safety... if you want to leave our country; we will treat you as you treat us."
On 22nd May, speaking at a rally in Bardhere town in Gedo region where weapons taken from the Kenyans in the Mandera ambush were being displayed to the public, Sheikh Fuad Mohamed Khalaf - a senior Al-Shabab member - called for Somalis and other Muslim people in Kenya to take up arms against the Kenyan state for its suppression of Muslim rights.
Sheikh Fuad made a case for the killing of Kenyan civilians because their troops are killing Muslim civilians in Somalia:
"The Muslim people in Kenya should take up arms; Kenya should be attacked, its state should be destroyed. As is written in the Quran when the disbelievers oppress by killing children and women... Allah has said if they punish you or hurt you, do to them like what they did to you. By God's permission, we will fight Kenya, we will concentrate our efforts in Kenya ... "
Sheikh Fuad also tells us that most Al-Shabaab members operating within Kenya are of Kenyan origin and are victims of its government's policies towards Muslims.
"We are training Muslim boys from Kenya who had been oppressed there, and we return them back there. The ones that we sent and killed your troops [in Mandera] are these; the ones we are going to send your way are much more than the ones we have already sent, by the permission of Allah... I end this by saying that we will move the war to Nairobi - and it is a promise we made to Allah"
Kenya as a theatre of Al-Shabaab's war
Al-Shabaab has been finding it relatively easy to operate in Kenya. It is a fertile breeding ground for support created by the marginalisation of Kenyan Muslims, Kenyan-Somali border is porous and easily negotiated and the Kenyan intelligence and police are seen as being largely incompetent.
Contrary to one of the key objectives of the Kenyan invasion - the creation of a buffer zone between the two countries - Al-Shabaab remains active in the border area. While Kenyan troops occupy major towns such as Kismayo, Al-Shabaab controls or has access to the vast rural expanses of southern Somalia.
The situational map in the south shows blue dots indicating major cities that are allied strongholds in a sea of green indicating Al-Shabaab control of the countryside. But the cities that Al-Shabaab lost in the March AMISOM offensive are almost all under siege, some garrisons such as in El Bur surviving on airlifts.
Al Shabaab has mastered the art of guerrilla warfare following years of fighting invading forces: it chooses only battles that it has a chance of winning, and currently has the initiative in the south.
As Kenya comes fully within Al-Shabaab's strategic focus, it is imperative for policy makers there to understand that continued discrimination is not only morally reprehensible, but is a security problem that gives Al-Shabaab space to thrive.
If Kenyan troops withdrew from Somalia today, Al-Shabaab would probably have no reason to continue expending its resources in the country and would focus its attention fully on Somalia. However, Kenyan youth who received training from Al-Shabaab would continue to be a security problem for years to come.
Mohamed Mubarak, a political and security analyst, is the founder of anti-corruption NGO Marqaati (Marqaati.org), based in Mogadishu @somalianalyst This article was commissioned via the African Journalism Fund.