When Thomas Jefferson was inaugurated in March of 1801, he inherited troubled relations with the Barbary states — the Ottoman Regencies of Algiers, Tunis, and Tripoli, along with independent Morocco. The United States had treaties with all four, but tension was high and rising.