In 1801, Yusuf demanded a tribute of $225,000 from United States President Thomas Jefferson. Jefferson, confident in the ability of the new United States Navy to protect American shipping, refused the Pasha's demands, leading the Pasha to unofficially declare war, in May 1801, by chopping down the flagpole before the American consulate. Jefferson responded by ordering the US Navy into the Mediterranean, successfully blockading Tripolitania's harbors in 1803. After some initial military successes, most notably the capture of the USS Philadelphia, the pasha soon found himself threatened with invasion by American ground forces following the Battle of Derna and the reinstatement of his deposed brother, Hamet Karamanli, recruited by the American army officer William Eaton. He signed a treaty ending the war on June 10, 1805.