The militant Islamist group al-Shabab says it carried out the attack, to target "a foreign enemy".
Al-Shabab is battling Somalia's government for control of the country.
On Sunday morning, a suicide car bomber and gunmen attacked a training centre for the national intelligence agency.
The militants have vowed to intensify attacks during the Muslim fasting month of Ramadan, which began on Wednesday.
BBC News