The First Barbary War (1801–1805), also known as the Tripolitan War and the Barbary Coast War, was a conflict during the Barbary Wars, in which the United States and Sweden fought against Tripolitania. Tripolitania had declared war against Sweden and the United States over disputes regarding tributary payments made by both states in exchange for a cessation of Tripolitatian commerce raiding at sea. United States President Thomas Jefferson refused to pay this tribute. Sweden had been at war with the Tripolitans since 1800.
On the night of 16 February 1804, Captain Stephen Decatur led a small detachment of United States Marines aboard the captured Tripolitan ketch rechristened USS Intrepid, thus deceiving the guards on Philadelphia to float close enough to board her. Decatur's men stormed the ship and overpowered the Tripolitan sailors. With fire support from the American warships, the Marines set fire to Philadelphia, denying her use by the enemy.