At least 19 people were killed in a series of bombings in Mogadishu, the capital of Somalia.
A bomb exploded outside the courts building as gunmen stormed the compound on Sunday. Security forces then arrived and battled the fighters inside.
Later, a bomb exploded near an African Union and Turkish Red Crescent convoy on the way to the airport.
Al Shabaab said it carried out the attacks. The group, which has links with al-Qaeda, has been blamed for a series of attacks in Mogadishu in the last two years. It was driven out of the capital in August 2011.
After two hours of fighting, the Somali government said that nine gunmen were involved in the assault and all had been killed. Six of them detonated suicide vests.
Witnesses said the attackers were dressed in Somali military uniform.