Seven people were killed when a car bomb exploded near the entrance of Mogadishu's heavily-guarded international airport where many foreign diplomats are based, police said.
Armed group al-Shabab told Al Jazeera that they detonated the bomb and that the target was a United Nations convoy.
"We claim responsibility for the Martyrdom operation. We have killed three white UN staff and injured one," Abdul Aziz Musab, the group's military operations spokesman, said.
The spokesman also told Al Jazeera the group had fired mortars at the presidential palace on Wednesday.
"A car laden with explosives was remotely exploded in front of a tea shop just outside the airport," senior police officer Colonel Abdikadir Ahmed told the Reuters news agency.
"So far we have confirmed seven people dead and 15 others injured. Many cars got burnt. We believe al-Shabab was behind the attack."
Ahmed Omar, a member of airport staff, told Reuters a deafening blast rang out near the airport and then the "sky was covered with smoke".
Although al-Shabab was pushed out of Mogadishu in 2011 by African Union peacekeeping troops, they have carried out several bombings in Mogadishu targeting government officials and foreign nationals.