Rabat - Militants claiming loyalty to terror group the Islamic State said they carried out the bombing attack at the Moroccan embassy in Libya in the early hours of Monday.