Dr. Lambert explained how those brigands, like today’s Somalis, usually kept their hostages alive. It wasn’t out of any enlightened sense of humanity. It was simply good business. They only hanged captives from giant hooks or carved them into little pieces if they resisted. The Barbary pirates used small wooden boats, often powered by slaves chained to the oars, to attack larger European ships. They were crude but effective, like today’s Somali swashbucklers, who in November commandeered a 1,000-foot-long Saudi oil tanker from a dinghy in the Gulf of Aden, a vital shipping lane at the mouth of the Red Sea.

Image PAST/PRESENT A Barbary Wars fight in 1804. Credit... Mansell/Time & Life Pictures — Getty Images

But the Barbary pirates’ bravado became their demise  something the Somalis might keep in mind.

The pirates’ way of doing business was described this way at the time: “When they sprang to the deck of an enemy’s ship, every sailor held a dagger in each hand and a third in his mouth, which usually struck such terror in the foe that they cried out for quarter at once.” The quote is from Thomas Jefferson, then America’s ambassador to France, after he and John Adams, the envoy in London, got the description from Tripoli’s envoy to Britain in 1786.

And that underscores a key point. The Barbary pirates actually had an ambassador  who met with Jefferson and Adams, no less. The pirates worked for a government. The Barbary rulers commissioned them to rob and pillage and kidnap, and the rulers got a cut. It was all official. And open. It was truly state-sponsored terrorism. And the Western nations’ response was to pay “tribute,” a fancy word for blackmail.

If a country paid tribute, the 18th-century pirates would leave its ships alone. Today, shipping companies fork over as much as $100 million in ransoms to the Somali pirates, a strategy that saves their cargoes but also attracts more underemployed Somali fishermen into the hijacking business.

The United States tried to play nice with the Barbary pirates and even inked a few treaties. That language, too, has a striking ring. The Barbary States were Muslim, as is Somalia. And America stressed that this was not about God.