After the War of 1812 the US war forced again to go to war with the Barbary Pirates. Emerging from the war much stronger the US had no trouble quickly defeating the Pirates.
The United States had gone to war once with the Barbary Pirates, but with war approaching with Great Britain, the Barbary Pirates went back to their old ways. The United States emerged from the war with a much stronger navy. Thus, once the * War of 1812 ended, American public opinion demanded that the United States take actions once and for all against the Barbary Pirates.
Commodore Stephen Decatur was dispatched with a strong fleet of ten ships. They departed New York on the 15th of May 1814. In June Decatur encountered the flagship of the Algerian fleet off the coast of Gibraltar. He easily defeated it. On June 28th the American fleet arrived in Algiers. Decatur demanded an end to the tribute, freedom for all American prisoners, and a payment of $10,000.
The Bay of Algiers tried to buy time, but the USS Independence a ship of the line positioned itself off the coast of Algiers, while * Decatur advanced on Tripoli and Tunis. The Barbary States were forced to agree to all the American demands. Those demands included a release of all hostages, the opening of Algerian ports to American ships, the ending of any further piracy, and the payment of $10,000. Decatur's fleet had defeated 29 Barbary ships. The fleet returned to the United States in triumph. From that moment on America was an emergent world power.