The decision has been condemned by Somalia, Egypt, Turkey and Djibouti, who call it a dangerous precedent.