Along the northern coast of Africa there were four countries—Morocco, Algeria, Tunis, and Tripoli (Libya)—that made up what was known as the Barbary Coast. These Moslem nations harbored and sent out notorious pirates who raided coastal towns and attacked merchant ships. Terror was their most dangerous weapon. Preying on weak enemies, they made slaves of those they captured.

For centuries the nations of Europe purchased a weak, never-lasting peace, by paying tribute to the Barbary Coast. Regrettably the pirates never honored their treaties and continued their appalling acts. This was the established custom of handling the affairs in the Mediterranean when the United States gained her independence. Since America was no longer protected by England, the Barbary countries began to attack ships from the United States. In 1796, America negotiated a treaty with Algeria that promised the initial amount of $642,500 and an annual tribute of naval stores equaling $21,600. This treaty released American sailors being held as slaves. Similar treaties were signed with Tunis, Morocco, and Tripoli. Scarcely was the treaty signed, however, when the four Barbary countries began complaining that their neighbors received better gifts than they did. Relations became so strained that on May 14, 1801, the Bashaw of Tripoli declared war against the United States.

Grimly America entered another war knowing they must protect their citizens and commerce. In 1798, the United States created the Navy Department. After Thomas Jefferson was elected President he named Richard Dale as Commodore. News of Tripoli’s declaration of war had not reached America when Dale’s squadron departed for the Mediterranean. They were merely a "squadron of observation." Once the fleet reached the Mediterranean, however, Dale learned that America was at war. Passing through Gibraltar, Dale sailed for Tripoli, the capital city of Tripoli, to set up a blockage of the harbor. During Dale’s command, the American ship Enterprise defeated the Tripoli. This victory gave the U.S. sailors the confidence they needed to face the Tripoli pirates whom everyone thought invincible. In 1802, Dale resigned when another man was promoted to the rank above him.

The navy’s second Commodore was Captain Richard Valentine Morris. Lacking leadership, Morris unfortunately accomplished very little during his command. Bringing along his wife and young son, Morris gave the impression of going on a pleasure cruise instead of visiting a war zone. Lazily Morris and his fleet sailed in the Mediterranean. In February 1803, Morris visited the America consul at Tunis where he showed his incompetence by allowing himself to be captured and held for ransom. When the Bey of Tunis received $22,000 he released the Commodore. Although his fleet had been in the Mediterranean for over a year, Morris did not reach the harbor of Tripoli until May 1803. Displeased with Morris’ actions, the United States recalled and court-martialed him.

Edward Preble, the navy’s next Commodore, was a brave, fearless man who embodied the American spirit of patriotism and ingenuity. When he took command he began executing plans with decision and firmness. Immediately upon reaching the Mediterranean, he began negotiating with Morocco who was threatening to proclaim war against America. His tactics were intimidation instead of tribute. Morocco agreed to peace. Next Preble tightened the blockade at Tripoli.

An unfortunate event happened on October 31, 1803, when the Philadelphia struck a reef near Tripoli. The Tripolitans sailed out to her where they happily accepted the surrender of the Philadelphia’s captain, William Bainbridge. The loss of the Philadelphia was heightened when the Tripolitans freed the ship from the reef and began preparations to use it against America. If the Tripolitans repaired the Philadelphia it could be a formidable enemy used against the United States. The ship had to be destroyed. Lieutenant Stephen Decatur volunteered to lead the expedition. The plan was to sail the Intrepid, a Tripolitan-style ship that had just been captured, into the harbor, moor her alongside the Philadelphia, clear the decks of the enemy, fill the ship with combustibles, and blow her to pieces. On a dark February night in 1804, the Intrepid sailed unnoticed into the Tripoli harbor. Stealing close to the Philadelphia, the Intrepid sailed directly under the castle guns. At ten o’clock the Tripolitan officer on the Philadelphia haled the Intrepid. He was kept talking as the two ships drifted closer together. Quickly the Americans boarded the Philadelphia and won the deck. The combustibles were set in place and the fuse lit before the city of Tripoli knew what was happening. The Philadelphia drifted close to the castle when she exploded. In less than half an hour the Americans had accomplished their mission. Only one sailor was wounded. The Philadelphia’s destruction prevented her from being used against her own people.