The first foreign episode involved Jefferson's war with the Barbary pirates. When the Pasha of Tripoli raised his demands in 1801, Jefferson refused to pay the increase, sent warships to the Mediterranean, blockaded the small nation, and tried unsuccessfully to promote a palace coup in Tripoli.