President Adams sent three representatives to France to ask the French to end the attacks. French foreign minister Talleyrand refused to speak to the Americans, so he had three secret agents meet them instead, later identified only as X, Y, and Z.
Jefferson Solves the Problem
In February 1799, President John Adams decided to send a group of men to France to work for peace. By the time the mission reached France, Napoleon Bonaparte took over the French government, and ordered the navy to stop seizing American ships. In a treaty between France and the United States in 1800, Napoleon agreed to end France's 1778 alliance with the United States.
The War of 1812
The peace that John Adams achieved with France didn't last long. In 1803, France and Great Britain were at war again, and both nations began seizing American ships that were trading with their enemy. President Thomas Jefferson tried to follow a policy of neutrality, like the presidents before him.
The Monroe Doctrine
After a year of US attacks and blockade, Tripoli signed a peace treaty with the United States in 1805. In 1815, US and European naval forces finally destroyed the pirate bases from other Barbary States.
President James Madison chose to abandon isolationism, resulting in Congress declaring war on Great Britain on July 17, 1812. This was a brave decision for a nation that had an army of only 7,000 poorly trained men and a navy of only 16 ships.
In 1823, President Monroe made a speech to Congress announcing a policy. Monroe stated that the nations of North and South America were "free and independent" and were "not to be considered as subjects for future colonization by any European powers." Europeans called Monroe's message arrogant, however, Americans cheered Monroe's message.