Piracy has long been the consequence of disorder. America's first foreign war — undeclared but authorized by Congress — was waged by President Thomas Jefferson against the Barbary pirates. It is instructive history for those who believe that the problem of Somali piracy can be solved the same way.

By the late 1700s, the European powers were incapable of maintaining maritime "law and order" and Islamic piracy became a flourishing enterprise in the Mediterranean and along the Atlantic coast of North Africa. Despite "tribute" payments to the "governments" in Algiers, Tunis, Tripoli and Morocco, by the British, French and new American governments, merchant mariners were at risk of being taken hostage for ransom and their ships and cargoes sunk or stolen.

By the time of Jefferson's inaugural in 1801, American ransoms and "tributes" amounted to more than $1 million per year — nearly one fifth of the U.S. budget. Jefferson pledged to end the payments and dispatched — with Congressional approval — the nascent U.S. Navy to protect American-flagged merchant vessels and prosecute a naval campaign against the Pasha of Tripoli.

It almost worked.

Catch the 'War Stories Classic: Battle for the Frozen Chosin,' Mon., December 1 at 3 a.m. ET

In February 1804, U.S. Navy Lieutenant Stephen Decatur succeeded in boarding and destroying a captured U.S. combatant — the USS Philadelphia — and liberating surviving members of the ship's imprisoned crew. A year later, a small party of U.S. Marines and mercenaries led by U.S. Marine Lieutenant Presley O'Bannon conducted an intrepid overland expedition to assault Derna and force the surrender of the Tripolitan leader, Yussif Karamanli. The Mamaluke sword he surrendered to O'Bannon is memorialized to this day in the dress sword worn by Marine Officers and by the line, "to the shores of Tripoli" in the Marines Hymn. It seemed like a glorious victory for American arms. But it wasn't.

Though Jefferson had pledged "not one cent in tribute," the treaty ending what came to be called The First Barbary War, provided $60,000 in ransom for the 300 "more or less" American citizens being held by the defeated government. Jefferson and Congress acquiesced because of the value he placed on American lives. It was a precedent that I came to know well.

By 1984, Beirut, Lebanon was the most lawless place on the planet. Organized terror cells and "freelance" criminal gangs routinely took Westerners hostage and held them for ransom. Those they couldn't "sell" were often killed. Then, Hezbollah — the radical Islamic terror group organized and operated by the theocratic government in Tehran — began snatching Americans. There were no military options and more than a dozen diplomatic initiatives failed to win the release of any of those being held.

Then, in 1985 President Ronald Reagan, at the behest of then White House chief of staff Don Regan, met personally with the families of Americans taken hostage in Beirut. After hearing directly from the anguished wives, children and loved ones of those being held, we were ordered to "do what's necessary" to obtain their release. That meant paying ransom. And that's what we did — not directly to the hostage holders — but to those who controlled Hezbollah: the Iranians.

Though the initiative resulted in the release of three of the hostages, it also reinforced the idea, begun in the 1700s, that Westerners in general — and Americans in particular — will pay ransom for their citizens. That lesson has been well learned by pirates armed with AK-47s and RPGs sailing from lawless, chaotic Somalia.

Thus far this year, there have been more than 300 attacks against merchant ships and commercial fishing vessels off the Somali coast. Sixty-five craft have been hijacked and more than 300 crewman taken hostage. Shipping companies and insurers are estimated to have paid out more than $40 million in ransoms for the release of ships' crews and cargoes — and insurance rates have reached more than $30,000 per day. NATO, the Indian Navy, the Persian Gulf powers, Russia and the U.S. have all deployed combatants to the area.

It hasn't worked. In fact, the piracy is getting worse. On November 18, the same day an Indian Navy frigate sank a pirate "mother ship," three other vessels were hijacked.

The U.N. Security Council has resolved to impose new sanctions on "those who support piracy." The European Union promises to dispatch a "Naval Task Force" in December to the Gulf of Aden. Unless shippers and commercial fishermen agree to convoy their vessels, these measures are all but meaningless. Everyone knows that the only reasonable long-term solution to the piracy problem is re-establishing rule of law in Somalia. And everyone — including the pirates — know that's unlikely to happen for years. Advocates of using military force to "clean out the pirates' nests ashore" have apparently forgotten global media opprobrium over "collateral damage" and "civilian casualties." Posting a battleship offshore might send the right message, but we don't have them anymore.

The only reasonable near-term solution is well-armed security personnel on merchant ships plying these dangerous waters. Since there are insufficient numbers of these men in the Armed Forces of the nations involved, it will have to be "privatized." Insurers and shippers may not like it and the global disarmament lobby may find the concept of armed "security contractors" offensive, but until pirates have to pay a terrible price for trying to seize a vessel at sea, they are unlikely to stop.

Oliver North hosts War Stories on FOX News Channel and is the author of the new best-seller, "American Heroes: In The War Against Radical Islam." He has just returned from assignment in Afghanistan.