How severe is the terror threat in East Africa?
Final preparations are under way for US President Barack Obama to touch down in the Kenyan capital this week - his first visit to the country of his father's birth as head of state.
As US security personnel flood Nairobi's hotels, the president will step into a country where security and politics are closely entwined.
His trip has provoked divergent assessments of the security threat across Kenya and beyond.
Nairobi governor Evans Kidero sees the visit as the ultimate confirmation of Kenya's security - hailing Obama's stay as a testament to the country's stability.
The US State Department, on the other hand, has issued a travel alert for the visit.
It has warned of the potential terrorist threat to the Global Entrepreneurship Summit at which Obama will speak.
The presidential visit comes days after the reopening of Nairobi's Westgate mall.
Almost two years ago, 67 people were killed in its halls in a four-day siege for which Somali militant group al-Shabab claimed responsibility.
Its reopening has been heralded by many as a triumph of national resilience, growing security and, in the words of Kidero, the "indomitable Kenyan spirit".
For others, the reopening of its doors conjures haunting memories, amplified by al-Shabab's continuing attacks - of which its killing of 147 at Garissa University in April is its deadliest to date.
Al-Shabab poses the major terrorist threat in the region and is adapting its tactics as pressure mounts on home soil in neighbouring Somalia.
Here, the group has been weakened by concerted military efforts by the African Union Mission in Somalia (AMISOM) and US covert action.
Most recently, 30 militants - including key leaders - were killed in a US drone strike in southern Gedo region last Thursday.
The loss of strategic territory and personnel has seen al-Shabab expand its operations into Kenya and beyond.
This has complicated the landscape of violent extremism in East Africa. The group has long threatened to repay Kenya for military operations in Somalia - and since 2011 has gruesomely followed through.
Yet this shift is more thoroughgoing and strategic in nature.
Long a territorially focused group with quasi-governmental ambitions to impose Sharia law at home, al-Shabab is now becoming a more mobile, networked regional presence.
This has brought it a number of benefits. Al-Shabab's growing reach along the African coast is providing valuable new sources of funding and recruits.
This is a logical adaptation: enhanced global counter-terror finance efforts have strangled funding from the Somali diaspora, amongst other international sources.
In terms of recruitment, as foreign fighters have been drawn to Syria, the group has been overshadowed on the global stage.
Yet al-Shabab has stepped up its Swahili-language propaganda - which plays on deep-seated social, economic and political grievances in East African states.
In Kenya, an expanding al-Shabab presence has combined potently with growing radicalisation among Muslim youth and separatist tension along the coast.
In Tanzania, there are fears that growing disaffection and domestic extremism could potentially intersect with a greater al-Shabab presence.
Meanwhile, enhanced collaboration with organised criminal groups - themselves a growing security concern - is allowing al-Shabab to diversify its income.
The incentives for this engagement have only expanded as East Africa has grown as a hub for illicit trafficking - from South Asian heroin to Yemeni arms to Tanzanian ivory.
The direction in which this more mobile terrorist model of financing and recruitment develops will have long-term implications for East African security.
Its evolution will depend on two sets of factors in particular.
The first relates to tensions within al-Shabab's leadership over the group's strategic direction.
Traditionalists favour a focus on strengthening the group in Somalia.
Internationalists - including former leader Godane, killed last year in a US drone strike - see al-Shabab as a transnational jihadist organisation.
With the rise of the self-styled Islamic State (IS) in Iraq and Syria, tensions also persist over global allegiances.
An affiliate of al-Qaeda since 2012, al-Shabab is now courted by IS, which has received pledges from groups across North and West Africa.
Rumours have abounded that al-Shabab could soon follow suit.
Yet, in an Eid message on Friday, current leader Abu Ubaidah hinted that no such pledge would be forthcoming.
Who are al-Shabab?
Al-Shabab means The Youth in Arabic.
It emerged as the radical youth wing of Somalia's now-defunct Union of Islamic Courts, which controlled Mogadishu in 2006, before being forced out by Ethiopian forces.
There are numerous reports of foreign jihadists going to Somalia to help al-Shabab, from neighbouring countries, as well as the US and Europe.
It is banned as a terrorist group by both the US and the UK and is believed to have between 7,000 and 9,000 fighters.
The second set of factors affecting the group's evolution remain extraneous to the organisation.
These relate instead to the ability of regional governments to curb al-Shabab and affiliates' power to act as "the voice of the marginalised" on their soil.
This poses new challenges - requiring governments to look inward at the deep-rooted grievances held by citizens.
The tendency, instead, has been to depend on polarising hard-security crackdowns on terrorist suspects.
As al-Shabab continues to recruit heavily amongst marginalised Kenyan Muslim communities, much will depend on the Kenyan government's ability to engage with underlying drivers of radicalisation.
Its approach to addressing them, and its ability to offer citizens better governance and prospects, will be key to improving security in this volatile region.
Cathy Haenlein is a research analyst on national security and resilience studies at RUSI and deputy editor of RUSI Newsbrief.