An interesting historical note — the destroyer sent out to engage with the Somali pirates, the USS Bainbridge, was named after William Bainbridge, a Navy Commodore known in no small way for having to deal with pirates.
In 1800, then-Captain Bainbridge was given command of the frigate George Washington and delivered tribute to the Dey of Algiers so as to keep Barbary pirates from raiding American shipping vessels.
Bainbridge is said to have found the job distasteful, but he did it anyway.
By 1801, President Thomas Jefferson had decided that war against the Barbary pirates was a better course than continued tributes and the First Barbary War began (1801-1805).
Bainbridge was appointed commander of the Essex, cruising with other US Naval vessels and fighting the North African Barbary pirates.
He had some successes — capturing the Moorish warship Mesh-Boha and recapturing an America ship, the Celica.
But in 1803, after Bainbridge — all of 29 years old — had been assigned command of the 36-gun frigate Philadelphia in the Mediterranean, his ship ran aground just outside the harbor of Tripoli.
He surrendered and was imprisoned, along with his men, for 19 months. It was a humiliation.
But his career rebounded and after the War of 1812, he led a squadron against the Barbary pirates in the Second Barbary War (1815-1816).