Militant group al-Shabab has claimed responsibility for an attack which the United Nations has called an "attack against the people".
A failed raid in Somalia and anger at the capture of an al-Qaeda leader in Libya has focused on the US's problems in its fight against militants.
The British Foreign Office has confirmed that a British man has been arrested in Kenya following the siege at Westgate mall that has left dozens dead.
At least 16 people were killed as two car bombs exploded outside the law courts in Somalia's capital Mogadishu and gunmen stormed the building.
Two suicide bombers walked into a restaurant in central Mogadishu and killed at least 15 people on Thursday, police said.
Al-Shabab militants are advancing towards the port city of Kismayu, raising fears of a bloody clash with African Union soldiers.
Ethiopian troops and clan militia fighters forced al-Qaeda-linked militants to flee a Somali town after heavy clashes on Saturday.
Somalia has banned foreign aid workers and journalists from entering areas controlled by al-Shabaab insurgents, in fear of attacks on them.
After four years of conflict, Mogadishu bears the signs of a city slowly rising from the ruins of war, which killed about 20 000 people.
A suicide bomber blew himself up at the gates of the presidential palace in the Somali capital Mogadishu on Monday.