In the past, foreigners, including journalists and aid workers, have been kidnapped by armed gangs or Shabaab militants and held for ransom, sometimes for years at a time.
Terrorist bombings and assassinations are common and frequently claimed by the Shabaab which is fighting to overthrow the internationally backed government in Mogadishu.
International aid agencies, including the independent Switzerland-based ICRC, provide health care and other basic services in the war-torn country and are regarded as supporters of the government by the Shabaab and as a ready source of income by other militants and armed gangs.
On Tuesday a local employee of the World Health Organization (WHO) was shot in Mogadishu.
The WHO said in a statement Wednesday it was “shocked and saddened” by the killing of Mariam Abdullahi Mohamed, “a dedicated frontline worker”.
Between 2008-12 piracy off the coast of Somalia became a big business with crew members and their ships held for million-dollar ransoms, but in recent years attacks have become rare.
Gradually improving stability in Somalia allowed the holding of limited elections in 2016, but insecurity remains widespread.
In October, Somalia suffered its deadliest-ever bombing, with over 500 people killed in an attack blamed on the Shabaab.