American blockade of Tripoli
The states which Jefferson found the most offensive (he referred to their leaders as petty tyrants) were those of Algiers, Tunis, and Tripoli, all of which were under the control of the Ottoman Empire, but were ruled autonomously by local chieftains who paid tribute to the Sultan. In May 1801 the ruler in Tripoli, Yusuf Karamanli, known as the Pasha, cut down the American flag at its consulate there, indicating a state of war. In the United States, Congress did not vote for a declaration of war, but provided an authorization for the President to use the military to provide for the defense of American interests and property, through whatever means he deemed necessary.
At the end of May 1801, American Commodore Edward Preble arrived in Messina, Sicily, then part of the Kingdom of Naples, and negotiated an agreement which gave the United States access to the ports of Palermo, Messina, and Syracuse. The Neapolitans also provided the United States with gunboats and supplies to act against Tripoli, which was a walled fortress city protected with well over 100 mounted guns, a fleet of heavily armed brigs, schooners, and gunboats, and over 25,000 troops. In August 1801 USS Enterprise captured the Tripolitan vessel Tripoli, killing thirty of its crew. Ordered to take no prizes, Enterprise’s commander freed the ship, which limped back to Tripoli.
Upon its arrival in the port an outraged Karamanli had its captain humiliated by being marched through the streets of the city covered with the intestines of sheep, while seated backwards on a mule. After the humiliation the captain was bastinadoed (whipped on the soles of the feet) 500 times and dismissed from the Pasha’s service. The United States was by then blockading the port of Tripoli, but without defined rules of engagement. The absence of direction from the President or Congress prevented the American fleet from doing little beyond challenging the Tripolitan vessels entering or leaving the port. Tripoli had responded to such a challenge with gunfire, hence its defeat by Enterprise.
Throughout the year 1802, the United States dispatched ships to the region to blockade the Barbary ports, including the most powerful ships of the American fleet. The frigates Constitution, Chesapeake, Essex, Philadelphia, and Constellation patrolled the waters of the Mediterranean, protecting American merchant shipping from the Tripolitan corsairs, supported by smaller American sloops and brigs. The American heavy frigates sailed into the harbor of Tripoli to bombard its shore batteries and other defenses, and gunboats ran in under the guns of the frigates to engage those of the Tripolitans.
After pacifying Morocco and intimidating Algiers and Tunis, Preble returned his attention to aggressive offensive action against the Tripolitans. The Americans launched several raids using gunboats obtained from the Sicilians, supported by the smaller sloops and brigs of the American fleet, which were in turn supported as closely as possible by the heavier American frigates. The bombardments became so heavy that the Pasha openly displayed American prisoners on the walls of some of the fortifications to divert the American guns. As 1803 drew on, Preble, aware that his relief would soon arrive from the United States, ordered his ships to become yet more aggressive against the Tripolitans.