Al Qaeda’s East Africa affiliate, al-Shabab, said through its radio that its fighters carried out the attack.