Putting to sea for duty in the West Indies to serve in the Quasi-War with France, she arrived on the Guadeloupe Station in May 1800 and relieved the frigate. During this cruise she captured five French armed vessels and recaptured six merchant ships that had fallen into French hands. Returning home in March 1801, she was ordered to prepare for a year's cruise in the Mediterranean in a squadron commanded by Commodore Richard Dale. At his own request, Decatur was relieved of the command of Philadelphia by Captain Samuel Barron. The squadron arrived at Gibraltar on July 1, with Commodore Dale in the frigate. Philadelphia was directed to cruise the Straits and blockade the coast of Tripoli, since in May 1801 the Pasha Yusuf Karamanli had threatened to wage war onthe United States and had seized U.S. merchant vessels for ransom. Philadelphia departed Gibraltar for the United States in April 1802, arriving in mid-July. In ordinary until May 21, 1803, when she recommissioned, and sailed for the Mediterranean on July 28, 1803. She arrived in Gibraltar on August 24 with Captain William Bainbridge in command, and two days later recaptured the AmericanbrigCelia from the Moroccan ship-of-war Mirboka, and brought them both into Gibraltar.
Destruction
During the First Barbary War, Philadelphia, accompanied by, cruised off Tripoli until October 31, 1803, while giving chase and firing upon a pirate ship she ran aground on an uncharted reef off Tripoli Harbor. The captain, William Bainbridge, tried to refloat her, first laying the sails aback, and casting off three bow anchors and shifting the guns aftward, but a strong wind and rising waves drove her further aground. Next they jettisoned many of her cannons, barrels of water, and other heavy articles overboard in order to make her lighter, but this too failed. They then sawed off the foremast in one last desperate attempt to lighten her. All of these attempts failed and Bainbridge, in order not to resupply the pirates, ordered holes drilled in the ship's bottom, gunpowder dampened, sails set afire and all other weapons thrown overboard before surrendering. Her officers and men were made slaves of the Pasha. Philadelphia, which had been refloated by her captors, was too great a prize to be allowed to remain in the hands of the Tripolitans, so a decision was made to recapture or destroy her. The United States had captured the Tripolitan ketchMastico, renamed her, and re-rigged the ship with short masts and triangular sails to look like a local ship. A party of volunteers, led by Lieutenant Stephen Decatur, the son of Philadelphia's first master, was given the task. On February 16, 1804, under the cover of night and in the guise of a ship in distress that had lost all anchors in a storm and needed a place to tie up, Decatur sailed Intrepid next to Philadelphia. The Americans boarded the prize, and after making sure that she was not seaworthy, burned the ship where she lay in Tripoli Harbor. Britain's naval heroViscount Nelson is said to have called this feat "the most bold and daring act of the Age". a report which is open to doubt. Philadelphia's anchor was returned to the United States on April 7, 1871, when Mehmed Halet Pasha, the Ottoman governor, presented it to the captain of the visiting.
Local account of the destruction
In 1904, Charles Wellington Furlong, an American adventurer, went to Tripoli to investigate the sinking of Philadelphia and later wrote of it in his book, The Gateway to the Sahara: Observations and Experiences in Tripoli. In this book the following account, based on records from a local synagogue, is given: Furlong later reports in the same book, that he talked to other Arabs in Tripoli who said that the ship was not burned, but moved to the Lazaretto where it was dressed up as a trophy and its guns used to call the end of Ramadan. According to the detailed account of Hadji-Mohammed Gabroom, an American ketch was able to sneak in, kill some of the 10 guards, cause the others to flee, then set the ship on fire.