Several countries off the coast of Northern Africa encouraged the use of piracy to supplement their economies in the late eighteenth and early nineteenth centuries. For more established countries, this meant they had to deal with ships potentially being commandeered and goods being looted. To avoid this, these piratical countries made deals with certain European countries to allow immunity. Countries like Great Britain and France, whose merchant ships frequented the Mediterranean Sea, paid a designated tribute to these North African leaders to be granted this privilege. When the United States declared their independence they no longer had the protection of the British Navy, who also approved open attacks on their vessels. For a short while the United States also paid tribute to the pirate leaders to avoid attack, especially as the nation established itself. However, when Thomas Jefferson became president in 1801 he refused to pay tribute, which essentially supported piracy. The Pasha of Tripoli took great offence to this, demanded more tribute and “dramatically” declared war on the U.S on May 10, 1801. Coincidentally, Jefferson had just determined to “demonstrate American resolve” and essentially decided to defund the naval forces. Instead, Jefferson sent several vessels over to the coast of Tripoli which resulted in a sporadic naval growth. After four years of mostly American victories, a successful naval blockade, and an expedition through Egypt, a treaty to end the first Tripolitan War was drawn in 1805 that favored the United States.