Image Credit: Niño Jose Heredia/©Gulf News

The Kenyan president, Uhuru Kenyatta, usually bristles at any criticism of his government from the west. Since taking office in March 2013 — defying calls from Washington and London not to contest the presidency because he was facing charges at the International Criminal Court at the time — he has deepened ties with China while launching rhetorical attacks on what he calls western “imperial exploiter(s)”.

Yet, Barack Obama, who came to Kenya last week with strong words on the need to battle corruption, empower women, respect gay rights and drop outdated practices such as female genital mutilation (FGM), was treated decidedly differently. His frank discussion of the problems that bedevil the country would ordinarily have drawn a hostile reception from the government and its supporters. Instead, his address to the Kenyan nation at a sports arena last Sunday has been met with only gushing praise from broad sections of the public and media. There are not too many places in the world the US president will visit and find so many children named Barack Obama. There are many reasons why the US president could uniquely get away with the strident message he offered on the problems that hold the continent back. He is, of course, seen as a “son of the soil”, the child of a Kenyan father whose remarkable ascent to the US presidency has captivated many on the continent.

Beyond this personal connection, there is the question of tone. Obama was careful to preface his criticism by explaining that he spoke from a place of frustration at the unrealised potential of sub-Saharan Africa, a region that has been steadily outpaced by countries such as Singapore, which won independence at roughly the same time as Kenya.

Yet, the fact that Obama has only really engaged the continent in these frank terms towards the end of his time in office on what is clearly a farewell tour is a source of regret. The bully pulpit that is the US presidency, especially at a time when it is occupied by a man of African descent, would have been a powerful forum to try to nudge African leaders in the right direction.

Instead, especially in his first term, Obama was largely disengaged from Africa, although that could have had something to do with not wanting to offer extra oxygen to the birther movement.

But this new message on the need for change will be wasted if government, civil society and external partners don’t follow through. The Kenyatta government should seize the chance offered by Obama’s warnings on the dangers of discrimination against the Muslim community and mass targeting of Kenyans of Somali origin, to engage the community and work with them as partners in confronting Al Shabaab. For all the good news stories surrounding the growth of the Kenyan middle class and rising flows of investor funds, attacks from the Somalia-based militants threaten to reverse all these gains and, as Obama said, alienating a whole community is no way to defeat the militants.

The need to educate girls was another key theme of Obama’s visit. There are now more girls than boys accessing basic education in Kenya in part due to the introduction of free primary education in 2003. But girls still face underage marriages and the devastating tradition of FGM, despite both practices being illegal in Kenya. In reality, the laws are rarely enforced and the government needs to do far more to save the thousands of girls whose dreams are shattered by these outmoded traditions.

On some issues there will be little change in the short term. Kenyatta and Obama openly differed on the subject of gay rights, for example, but it was notable that the pair engaged in a civil exchange and Kenyatta framed his response in far more diplomatic terms — “gay rights is not really an issue” — than figures such as Robert Mugabe, Yoweri Museveni or Yahya Jammeh. Kenyatta’s stance is informed by the reality of public opinion in Kenya, where Pew research found that 90 per cent of the public opposes gay rights. At the least, though, campaigners can use Kenyatta’s declaration that the subject is a non-issue to press against harassment of individuals based solely on their sexual orientation.

Perhaps what the Obama trip might have offered above all else is an indication of the possible priorities the president could pursue when he leaves office. His enormous personal popularity, demonstrated by the brisk sales of US flags in Kenya for the last fortnight, means that an Obama released from the pressures of office could be a powerful — and effective — campaigner for change on the continent of his father’s birth when he leaves the White House.

— Guardian News & Media Ltd

Murithi Mutiga is a journalist based in Nairobi and has covered the conflicts in the Great Lakes region of Africa for a decade.