And these attacks were never considered unlawful in Islam. Instead, they were carried out on the grounds of their Jihadi right and were patronized by Islamic regimes of Tripoli, Algiers and Morocco. These attacks were also fully supported, and generally led, by Islamic clerics or Sufi masters. If you are still doubtful, hear what Tripoli’s ambassador to London, Abd al-Rahman, told Thomas Jefferson and John Adams in 1785 on their right to raid foreign ships and to enslave their crews:
...it was written in the Quran that all Nations who should not have acknowledged their (Islamic) authority were sinners; that it was their right and duty to make war upon whoever they could find and to make slaves of all they could take as prisoners; and that every Mussulman who should be slain in battle was sure to go to Paradise.
Most importantly, all Schools of Islamic law are unanimous that Muslims have a divinely-sanctioned right to attack any non-Muslim territory or establishment aggressively, kill the men, confiscate all the assets and properties as sacred booty and reduce the women and children into slavery. Prophet Muhammad himself had engaged in these divinely sanctioned acts and the Quran explicitly sanctions them [i.e., Quran 33:26-27]. As a result, Muslim armies, in order to fulfill their divine right, traveled thousands of miles from Arabia to attack foreign lands—India in the East, Europe in the West, Africa in the North, Russia in the South—with the full support and inspiration of Islamic authorities. When this is lawful, foreign caravans or merchant ships passing through/by Muslim territories obviously become even more lawful targets.
It is, therefore, utterly ignorant on part of the U.K. Foreign Office — nay, a perversion of Islamic law — to suggest that the Jihadi pirates of Somalia would face punishment at all, let alone beheading or amputation, for carrying out a divinely sanctioned duty. Instead, it is tantamount to blasphemy, because such a statement amounts to an indictment of Prophet Muhammad’s actions, of Quranic commands, and of sacred Islamic laws.