From the halls of Montezuma,
To the shores of Tripoli,
We will fight our country's battles
On the land and on the sea...
—U.S. Marine Corps Hymn
Richard Zach's thrilling novel, The Pirate Coast, provides insight into the reason for the second line of this chorus, "to the shores of Tripoli."
In 1785, the Moslem regent of Tripoly, Yussef Karamanli, declared war on an infant nation, the United States of America, sending out Barbary pirate vessels to harrass, sink or capture American shipping. The goal was to have tribute paid by the U.S., in exactly the way the Barbary regents had been bribed for centuries by France, Britain, Denmark, and so on. President Thomas Jefferson's response to one such demand (in public, anyway) was, "Millions for Defense, but Not One Penny in Tribute!"
By 1804, the war had escalated, with six U.S. fleet ships in the Mediterannean. Then Bey Yussef siezed the officers and crew of the U.S.S. Philadelphia, and held them as slaves while he waited for ransom and tribute to be paid. Jefferson responded by sending William Eaton, a former consul to the region who had already proved himself no friend to piracy or slavery, with a commission to find and support Bey Yussef's brother Hamet in a coup atttempt to create a U.S.-friendly state on the Barbary Coast.
Once Eaton had departed, however, Jefferson began to reconsider the commission. In the age of sailing ships, information from the other side of the world might be years out of date, and Eaton, no diplomat, had ruffled more than a few feathers while a consul in the Middle East.
A former army captain, Eaton had recently been court-martialed and convicted. He was impetuous, hardheaded, argumentative. His loud voice cut through conversations; his ramrod-straight stance inspired respect; his Dartmouth education added polysyllables to his vocabulary. Diplomacy, he had very little; he was blunt-spoken, exceedingly direct. He once wrote of the feeble efforts of the U.S. Navy that "a fleet of Quaker meeting houses would have done just as well."
The US. government, with a huge debt from the Revolutionary War, found it cheaper to pay off Tunis—and keep the pirates away—than to fight against them, Jefferson's anti-tribute bluster to the contrary. Eaton, however, was appalled by the aspect of slavery close-up.
"For my part, it grates me mortally when I see a lazy Turk [a Moslem] reclining at his ease upon an embroidered sofa, with one Christian slave to fan away the flies, another to hand him his coffee and a third to hold his pipe... It is still more grating to perceive that the Turk believes he has a right to demand this contribution and that we, like Italians, have not the fortitude to resist it."
Within two years, this disgraced diplomat would lead a band of eight Marines (then a service chiefly known for supplying military bands to Washington ceremonies) and several hundred foreign mercenaries, "the dregs of Alexandria, on a mad hopeless mission to march across the hell of the Libyan desert." Eaton, cut off from the promised funds for his mission, used every wit and wile available to him to round up the missing Hamet, corral the nomadic tribes who had allied against Bey Yussef, and keep them all marching in the same direction.