Jefferson continued to maintain that paying "tribute," which he called nothing more than blackmail, to the Muslim states was not the way to deal with the pirates. He told others, including John Adams, that only through "the medium of war" would America be free of the piracy that plagued her ships.
Jefferson drew heavy criticism when the pirates captured the USS Philadelphia in 1803 and its 300 man crew. In his diary, he related how in 1805 he sent Army officer William Eaton along with a unit of Marines under Lieutenant Presley O'Bannon to attack Tripoli. This was America's first battle to take place on foreign soil.
Eaton joined forces with the pasha's brother, Hamet, the rightful heir to the Tripolitanian throne, who was currently in exile in Egypt. Their target was the highly fortified port of Derna. Under the leadership of Captain Isaac Hull, Hamet led soldiers to cut off the road to Tripoli while the Marines and the rest of the hired mercenaries attacked the harbor.
The Marines fought hand-to-hand all the way to the governonor's palace. An hour and fifteen minutes after their ground assault, Lieutenant O'Bannon raised the American flag over Derna. Eaton and O'Bannon wanted to press farther into Tripoli, but Jefferson refused to give the order. He believed securing the release of all Americans being held in Tripoli, including the crew from the USS Philadelphia, to be more important.