As a result of the XYZ Affair, the U.S. Congress rescinds the Treaty of Alliance with France sparking the "Quasi-War".

The Treaty of Alliance (French: trait d'alliance (1778)), also known as the Franco-American Treaty, was a defensive alliance between the Kingdom of France and the United States of America formed amid the American Revolutionary War with Great Britain. It was signed by delegates of King Louis XVI and the Second Continental Congress in Paris on February 6, 1778, along with the Treaty of Amity and Commerce and a secret clause providing for the entry of other European allies; together these instruments are sometimes known as the Franco-American Alliance or the Treaties of Alliance. The agreements marked the official entry of the United States on the world stage, and formalized French recognition and support of U.S. independence that was to be decisive in America's victory.

The Treaty of Alliance was signed immediately after the Treaty of Amity and Commerce, in which France was the first nation to formally recognize the U.S. as a sovereign nation; this treaty had also established mutual commercial and navigation rights between the two nations, in direct defiance of the British Acts of Trade and Navigation, which restricted American access to foreign markets. In contemplation that these commercial and diplomatic ties would result in hostilities between France and Britain, the Treaty of Alliance guaranteed French military support in just such an event. It also forbade either nation from making a separate peace with Britain, and was contemplated as a permanent defensive pact.

The successful negotiation of the Treaty of Alliance and its sister agreements is considered the "single most important diplomatic success of the colonists", since it helped secure vital aid in the war with Britain; the treaties were immediately followed by substantial material, military, and financial support to the American cause. Some historians consider the signing of the Treaty of Alliance as marking America's de jure recognition as an independent nation. Notwithstanding its significance, subsequent complications with the Treaty of Alliance led to its annulment by the turn of the 19th century, with the United States eschewing formal military alliances until the Second World War.

The XYZ Affair was a political and diplomatic episode in 1797 and 1798, early in the presidency of John Adams, involving a confrontation between the United States and Republican France that led to the Quasi-War. The name derives from the substitution of the letters X, Y, and Z for the names of French diplomats Jean-Conrad Hottinguer (X), Pierre Bellamy (Y), and Lucien Hauteval (Z) in documents released by the Adams administration.

An American diplomatic commission was sent to France in July 1797 to negotiate a solution to problems that were threatening to break out into war. The diplomats, Charles Cotesworth Pinckney, John Marshall, and Elbridge Gerry, were approached through informal channels by agents of the French foreign minister, Talleyrand, who demanded bribes and a loan before formal negotiations could begin. Although it was widely known that diplomats from other nations had paid bribes to deal with Talleyrand at the time, the Americans were offended by the demands, and eventually left France without ever engaging in formal negotiations. Gerry, seeking to avoid all-out war, remained for several months after the other two commissioners left. His exchanges with Talleyrand laid groundwork for the eventual end to diplomatic and military hostilities.

The failure of the commission caused a political firestorm in the United States when the commission's dispatches were published. It led to the undeclared Quasi-War (1798–1800). Federalists, who controlled both houses of Congress and held the presidency, took advantage of the national anger to build up the nation's military. They also attacked the Democratic-Republicans for their pro-French stance, and Gerry (a nonpartisan at the time) for what they saw as his role in the commission's failure.