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, 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. After capturing several corsairs and their crews, Decatur sailed into the harbor of Algiers, threatened the city with his guns, and concluded a favorable treaty in which the dey agreed to discontinue demands for tribute, pay reparations for damage to United States property, release United States prisoners without ransom, and prohibit further interference with United States trade by Algerian corsairs. No sooner had Decatur set off for Tunis to enforce a similar agreement than the dey repudiated the treaty.