The Quasi-War refers to a period of tension between the U.S. and France during the presidencies of Washington and Adams. Although it wasn’t a declared war, there was widespread fighting on the open seas and without the action of some key individuals it could have resulted in open conflict between the U.S. and France.
The problems began soon after the French Revolution broke out. The French expected the U.S. to help them as they had done during the American Revolution. However, Washington could see that the U.S. was in no shape to get involved in what was rapidly becoming a war against all of Europe, and he decided instead to declare neutrality and make peace with the British.
The French were outraged at this and began impressing American ships. Washington was powerless to stop this since the American Navy was nonexistent, so when Adams took power in 1796 he was keen to try and restart diplomatic talks. His diplomatic efforts only made things worse.
When the American Diplomats arrived, they were greeted by a trio of spies codenamed X, Y, and Z. They demanded a tribute before they allowed the Americans to meet with the French ambassador, and when they refused to pay they were sent home.
Their story, which became known as the XYZ Affair, sparked war fever in the U.S. Adams allowed American privateers to capture French ships in retaliation, adding to the tension. Although his own party demanded he declare war and the idea of war made him extremely popular, he refused to support it. This decision eventually cost him reelection, but ended the danger of war with France.