A car bomber and a group of gunmen on Monday struck an air base in Somalia that American forces use in the fight against the militant group known as the Shabab, which claimed responsibility for the attack.

Another car bombing took place later in the morning in Mogadishu, the capital. The explosion missed its apparent target, a group of Italian peacekeeping troops, but injured Somali civilians, according to local news reports.

The first attack hit the Bale Dogle airfield, about 55 miles northwest of central Mogadishu, in the Lower Shabelle region in southern Somalia. A suicide bomber detonated a vehicle packed with explosives at the gate of the airstrip, according to Lt. Cmdr. Desiree Frame, a spokeswoman for the United States Africa Command, and Yusuf Abdourahman, a security official with the Lower Shabelle regional administration.

The Shabab claimed responsibility for the attack, saying in a statement that its fighters had “stormed the military complex, engaging the crusaders in an intense firefight.” There were reports of gunfire at the base after the explosion.