The 1798 XYZ Affair -quite the Faux pas.

The XYZ Affair was a 1798 diplomatic episode during the administration of US president John Adams that Americans interpreted as an insult from France. It led to an undeclared naval war called the Quasi-War, which raged at sea from 1798 to 1800. The Federalist Party took advantage of the national anger to build an army and pass the Alien and Sedition Acts to damage the rival Democratic Republican Party.

A political cartoon depicting the incident

Three French agents, publicly referred to as X, Y, and Z demanded major concessions from the United States as a condition for continuing bilateral peace negotiations. The concessions demanded by the French included 50,000 pounds sterling, a $12 million loan from the United States, a $250,000 personal bribe to French foreign minister Charles Maurice de Talleyrand, and a formal apology for comments made by President of the United States John Adams.

The demand came during a meeting in Paris, France between the French agents and a three-member American commission consisting of Charles Cotesworth Pinckney, John Marshall, and Elbridge Gerry. Several weeks prior to the meeting with X, Y, and Z, the American commission had met with French foreign minister Talleyrand to discuss French retaliation to the Jay Treaty, which they perceived as evidence of an Anglo-American alliance. French privateers seized nearly 300 American ships bound for British ports in the Atlantic, Mediterranean, and Caribbean seas. Adams decided on sending Pinckney as part of the commission as Franco-U.S. relations had recently worsened by Talleyrand's rejection of Pinckney as America's minister to France. The French continued to seize American ships, and the Federalist Party, incited by Alexander Hamilton, advocated going to war. Congress authorized the build-up of an army.

The American delegates found these demands unacceptable, and answered, "Not a sixpence", but in the inflated rhetoric of the day, the response became the infinitely more memorable: "Millions for defence, sir, but not one cent for tribute!"

The United States offered France many of the same provisions found in the Jay Treaty with Britain, but France reacted by deporting Marshall and Pinckney back to the United States, refusing any proposal that would involve these two delegates, both key Federalists. Gerry (a Jeffersonian Republican added to the delegation to give it credibility) remained in France, thinking he could prevent a declaration of war, but did not officially negotiate any further.
Republicans in Congress, thinking Adams might be hiding the truth, demanded that he release the French proposals. After refusing to do so for some time, Adams then released the report of the affair resulting in a wave of passionate anti-French sentiment across the U.S. that seriously damaged the Republicans and helped the Federalists win the 1798 elections.  A formal declaration of war was narrowly avoided by Adams' diplomacy, specifically by appointing new diplomats including William Vans Murray to handle the conflict.

The so called 'Quasi-War' began in July, 1798. While there was no formal declaration of war, the conflict escalated with more French seizures of American merchant ships, American seizure of French merchant ships, and the abrogation of the Franco-American Alliance. Adams again sent negotiators on January 18, 1799, who eventually negotiated an end to hostilities through the Treaty of Mortefontaine. During negotiations with France, the U.S. began to build up its navy, a move long supported by Adams and Marshall, to defend against both the French and the British. In addition, in a speech delivered on July 16, 1797, Adams championed the formation of a navy and army, while emphasizing the importance of renewing treaties with Prussia and Sweden.

By the autumn of 1800, the United States Navy and the Royal Navy, combined with a more conciliatory diplomatic stance by the government of First Consul Napoleon Bonaparte, had reduced the activity of the French privateers and warships. The Convention of 1800, signed on September 30, ended the conflict. Unfortunately for President Adams, the news did not arrive in time to help him secure a second term in the United States presidential election, 1800.