On August 1, 1801, the schooner Enterprise, commanded by Lieutenant Andrew Sterett, encountered the Barbary corsair Tripoli west of Malta and prepared for engagement. After a three-hour battle and false surrenders by Tripoli's commander, Admiral Rais Mahomet Rous, Enterprise broadsided the vessel. Admitting defeat, Rous threw the Tripolitian flag into the sea. The success of the battle inspired the United States to continue the war against the Barbary States. Sterett resigned his commission from the Navy in June 1805.