Suicide bombers attacked the main peacekeeping base in Somalia's capital on Monday, killing at least three Somali security officers, police said.
Islamist al Shabaab militants, who want to topple the Western-backed government, said they carried out the assault near Mogadishu's main airport, an area used by several embassies, aid groups and telecoms companies.
One bomber drove a car into a checkpoint outside the headquarters of the African Union peacekeeping force AMISOM, killing three Somali officers stationed there, police officer Mohamed Ahmed said.
Another vehicle then drove through toward the base's main gates but came under fire from peacekeepers.
"It exploded about 200 metres from the gate. Civilian buildings were damaged," AMISOM said on its Twitter feed.
The powerful blasts damaged the front of the nearby Hotel Peace, though there were no immediate reports of casualties there. The burned-out shell of one of the wrecked vehicles lay outside.
Al Shabaab's military spokesman Sheikh Abdiasis Abu Musab said the fighters had intended to attack the hotel, as African leaders seeking a solution to Somalia's decades-long turmoil had met there last year.
Nearly 300 members of Somalia's federal parliament were sworn in last week after elections and are expected to pick a new president.