"Barbary" states and Islam: Not a new problem
One of the challenges for the new [Washington administration]team was to figure out how to deal with the lawless North African, or 'Barbary,' states---Algiers, Tripoli, and Tunis---which plundered foreign vessels in the Mediterranean and enslaved their crews. Many European powers had grown resigned to paying "tribute"---a polite word for ransom money---to win the release of their crews. As American crews succumbed to these pirates and were threatened with forced conversion to Islam, [President]Washington was offended by the need to pay bribes, especially after Algiers seized eleven American merchant ships and a hundred prisoners. Reluctantly, he authorized the payment of money to Algiers and even tried to negotiate a treaty of amity and commerce with the city-state, but he thought the time had come to back up American diplomacy with military might. In March 1794 Congress approved a proposal, backed by Washington and Knox, to build six frigates adequate for the protection of the commerce of the U.S. against Algerian corsairs. The action officially inaugurated the U.S. Navy, although it would take four more years before a separate Navy Department was born (emphasis added, pages 713-714, "Washington: A life," by Ron Chernow, Penguin Press, 2010).
When he became president, Thomas Jefferson put the new navy to good use.