On October 31, 1803, the frigate Philadelphia ran aground near Tripoli while pursuing an enemy vessel in shallow water. She was accompanied by the schooner Vixen. They were ordered to blockade the port by Commodore Edward Preble. As a result, the Tripolitans sent a large gunboat force and attacked the frigate. Stuck fast and listing, she was defenseless and with reinforcements coming, Captain William Bainbridge surrendered. The frigate was pulled off by her captors and taken to Tripoli harbor, where she represented not just a humiliating defeat but a threat to American warships and commercial shipping. Under Preble's orders Lieutenant Stephen Decatur led a mission to burn Philadelphia in February 1804.