But when peace was restored to Europe in 1815, Algiers found itself at war with Spain, the Netherlands, Prussia, Denmark, Russia, and Naples. In March of that year, in what became the Second Barbary War, the United States Congress authorized naval action against the Barbary States, the then-independent Muslim states of Morocco, Algiers, Tunis, and Tripoli. Commodore Stephen Decatur was dispatched with a squadron of ten warships to ensure the safety of United States shipping in the Mediterranean and to force an end to the payment of tribute.