Three African Union soldiers and a civilian were killed Thursday after Shebab militants attacked the force's heavily fortified headquarters in Somalia, the AU force known as AMISOM said.