The U.S. Navy attempted to blockade Tripoli's harbors with a squadron sent by President Jefferson in 1803. After some initial military successes, most notably the capture of the grounded American frigate USS "Philadelphia" in October 1803, the pasha soon found himself threatened after the daring raid led by Lt. Stephen Decatur, USN, (1779-1820), to burn and scuttle the "Philadelphia" in Tripoli harbor, the following February 1804, then with facing invasion by American Marines and mercenary ground forces following the Battle of Derna in April 1805 to the east and the reinstatement of his deposed brother, Hamet Karamanli, recruited by the American army officer and diplomatic consul William Eaton (1764-1811). He signed a treaty with American emissary Tobias Lear (1762-1816), from the U.S. Department of State ending the war on June 10, 1805.