The Republic found, however, that so long as England and France were paying tribute to the pirates it would be easier for her to do the same thing than to fight them. The American Navy was very small, and the Mediterranean was far distant. England seemed actually to be encouraging the pirates, thinking that their attacks on American ships would injure the country that had lately won its independence. So the United States made the best terms it could with the rulers of Algiers, Morocco, Tunis, and Tripoli, and paid heavy ransoms for the release of the captives. There was little self-respect or honor among the Moorish chiefs, however. One Dey succeeded another, each more greedy than the last, and each demanded more tribute money or threatened to seize all the Americans he could lay hands upon. The consuls had to be constantly making presents in order to keep the Moors in a good humor, and whenever the Dey felt the need of more money he would demand it of the United States consul, and threaten to throw him in prison if he refused.
This state of affairs was very unpleasant for free men, but for a number of years it had to be put up with. When Captain Bainbridge dropped anchor off Algiers in command of the United States frigate George Washington, the Dey demanded that he should carry a Moorish envoy to Constantinople with presents for the Sultan of Turkey. Bainbridge did not like to be treated as a messenger boy; but the Dey said, "You pay me tribute, by which you become my slaves. I have, therefore, a right to order you as I may think proper." Bainbridge had no choice but to obey the command, or leave American merchant vessels at the mercy of the Moors, and so he carried the Dey's presents to the Sultan.
As all the Barbary States throve on war, in that way gaining support from the enemies of the country they attacked, one or the other was constantly making war. In May, 1801, the Pasha of Tripoli declared war against the United States, cut down the American flagstaff at his capital, and sent out his pirate ships. In reply the United States ordered a squadron of four vessels under command of Commodore Richard Dale to sail to the Mediterranean. This squadron did good service, capturing a number of the galleys of Tripoli, and exchanging Moorish prisoners for American slaves. But the pirates were like a swarm of hornets; they stung wherever they got a chance, and as soon as the war-ships were out of sight they would steal out from their hiding-places to terrorize the coast. The United States had to keep sending squadrons to act as policemen. When the fleet kept together the Moors had proper respect for them, but once the ships separated they became the target for the hornets.
The frigate Philadelphia, of thirty-six guns, was detailed in October, 1803, to blockade the port of Tripoli. The morning after she reached there she saw a ship inshore preparing to sail westward. The frigate gave chase, and as the other vessel carried the colors of Tripoli, the frigate opened fire. As she chased the Moor the Philadelphia ran on a shelving rock that was part of a long reef. Her crew worked hard to get her off, but she stuck fast. As the Moors on shore saw the plight of the Philadelphia they manned their boats, and soon she was surrounded by a swarm of pirate galleys. The galleys sailed under the fire of the frigate's heavy guns, and came up to close quarters, where the cannon could not reach them. The Americans were helpless, and by sunset Commodore Bainbridge had to strike his flag. As soon as he surrendered the Moors swarmed over the sides of his ship, broke everything they could lay their hands on, stripped officers and men of their uniforms, and tumbled them into the small boats. The prisoners were landed at night, and led to the castle gate. The sailors were treated as slaves, but the officers were received by the Pasha in the great marble-paved hall of his palace, where that ruler, dressed in silks and jewels, and surrounded by a gorgeous court, asked them many questions, and later offered them supper. But the favor of the Pasha was as fickle as the wind; within a day or two he was treating the American officers much as he treated his other Christian captives, and the crew, three hundred and seven in number, were worked as slaves. Meantime the Moors, using anchors and cables, succeeded in pulling the Philadelphia off the reef, and the frigate was pumped out and made seaworthy. She was brought into the harbor, to the delight of the Pasha and his people at owning so fine a war-ship. The loss of the Philadelphia was a severe blow, not only to American pride, but to American fortunes. The squadron was now much too small for service, and Bainbridge and his crew were hostages the United States must redeem.
It fell to the lot of Commodore Preble to take charge of the American ships in the Mediterranean, and he began to discuss terms of peace with Tripoli through an agent of the Pasha at Malta. By these terms the frigate Philadelphia was to be exchanged for a schooner, and the Moorish prisoners in Preble's hands, sixty in number, were to be exchanged for as many of the American prisoners in Tripoli, and the rest of the American captives were to be ransomed at five hundred dollars a man. Before these terms were agreed upon, however, a more daring plan occurred to the American commodore, and on February 3, 1804, he entrusted a delicate task to Stephen Decatur, who commanded the schooner Enterprise. Decatur picked a volunteer crew, put them on board the ships Siren and Intrepid, and sailed for Tripoli. They reached that port on February 7th, and to avoid suspicion the Intrepid drew away from the other ship and anchored after dark about a mile west of the town. A small boat with a pilot and midshipman was sent in to reconnoiter the harbor. They reported that the sea was breaking across the western entrance, and as the weather was threatening advised Decatur not to try to enter that night. The two American ships therefore stood offshore, and were driven far to the east by a gale. The weather was so bad that it was not until February 16th that they returned to Tripoli. This time the Intrepid sailed slowly toward the town, while the Siren, disguised as a merchantman, kept some distance in the rear.
The frigate Philadelphia, now the Pasha's prize ship, lay at anchor in the harbor, and the Intrepid slowly drifted toward her in the light of the new moon. No one on ship or shore realized the real purpose of the slowly-moving Intrepid. Had the men at the forts on shore or the watchman at the Pasha's castle suspected her purpose they could have blown her from the water with their heavy guns.
The Intrepid drifted closer and closer, with her crew hidden, except for six or eight men dressed as Maltese sailors. Decatur stood by the pilot at the helm. When the little ship was about one hundred yards from the Philadelphia she was hailed and ordered to keep away. The pilot answered that his boat had lost her anchor in the storm, and asked permission to make fast to the frigate for the night. This was given, and the Moorish officer on the Philadelphia asked what the ship in the distance was. The pilot said that she was the Transfer, a vessel lately purchased at Malta by the Moors, which was expected at Tripoli about that time. The pilot kept on talking in order to lull the Moors' suspicions, and meantime the little Intrepid came close under the port bow of the Philadelphia. Just then the wind shifted and held the schooner away from the frigate, and directly in range of her guns. Again the Moors had a chance to destroy the American boat and crew if they had known her real object. They did not suspect it, however. Each ship sent out a small boat with a rope, and when the ropes were joined the two ships were drawn close together.
When the vessels were almost touching some one on the Philadelphia suddenly shouted, "Americanos!" At the same moment Decatur gave the order "Board!" and the American crew sprang over the side of the frigate and jumped to her deck. The Moors were huddled on the forecastle. Decatur formed his men in line and charged. The surprised Moors made little resistance, and Decatur quickly cleared the deck of them; some jumped into the sea, and others escaped in a large boat. The Americans saw that they could not get the Philadelphia safely out of the harbor, and so quickly brought combustibles from the Intrepid, and stowing them about the Philadelphia, set her on fire. In a very few minutes she was in flames, and the Americans jumped from her deck to their own ship. It took less than twenty minutes to capture and fire the Philadelphia.
Decatur ordered his men to the oars, and the Intrepid beat a retreat from the harbor. But now the town of Tripoli was fully aroused. The forts opened fire on the little schooner. A ship commanded the channel through which she had to sail, but fortunately for the Intrepid the Moors' aim was poor, and the only shot that struck her was one through the topgallantsail. The harbor was brightly lighted now. The flames had run up the mast and rigging of the Philadelphia, and as they reached the powder loud explosions echoed over the sea. Presently the cables of the frigate burned, and the Philadelphia drifted ashore and blew up. In the meantime the Intrepid reached the entrance safely, and joining the Siren set sail for Syracuse.
The blowing up of the Philadelphia was one of the most daring acts ever attempted by the United States Navy, and won Decatur great credit. It weakened the Pasha's strength, and kept his pirate crews in check. Instead of making terms with the Moorish ruler, the United States decided to attack his capital, and in the summer of 1804, Commodore Preble collected his squadron before Tripoli. On August 3d the fleet approached the land batteries, and in the afternoon began to throw shells into the town. The Moors immediately opened fire, both from the forts and from their fleet of nineteen gunboats and two galleys that lay in the harbor. Preble divided his ships, and ordered them to close in on the enemy's vessels, although the latter outnumbered them three to one. Again Decatur was the hero of the fight. He and his men boarded a Moorish gunboat and fought her crew hand-to-hand across the decks. He captured the first vessel, and then boarded a second. Decatur singled out the captain, a gigantic Moor, and made for him. The Moor thrust at him with a pike, and Decatur's cutlass was broken off at the hilt. Another thrust of the pike cut his arm, but the American seized the weapon, tore it away, and threw himself on the Moor. The crews were fighting all around their leaders, and a Moorish sailor aimed a blow at Decatur's head with a scimitar. An American seaman struck the blow aside, and the scimitar gashed his own scalp. The Moorish captain, stronger than Decatur, got him underneath, and drawing a knife, was about to kill him, when Decatur caught the Moor's arm with one hand, thrust his other hand into his pocket, and fired his revolver. The Moor was killed, and Decatur sprang to his feet. Soon after the enemy's crew surrendered. The other United States ships had been almost as successful, and the battle taught the Americans that the Barbary pirates could be beaten in hand-to-hand fighting as well as at long range.