The XYZ Affair was a diplomatic crisis between the United States and France from 1797 to 1798 during which President John Adams sent three envoys to France to prevent a full-scale war, according to the Thomas Jefferson Foundation. The name of the incident comes from Adams's use of X, Y and Z to denote three French ministers' names in publicly released diplomatic correspondence.
Relations with France cooled since the Revolutionary War. France felt that the United States treated France unfairly when the United States signed the Jay Treaty of 1794 with Great Britain. In 1796, France started attacking American ships in French ports. The French government, itself in a transition since the overthrow of the monarchy in 1789, refused to receive Charles C. Pinckney as the U.S. ambassador.
Adams sent Pinckney, Elbridge Gerry and John Marshall to negotiate terms with France. The French wanted several monetary considerations including huge low-interest loans, bribes and fees before releasing American ships. France needed funding for its looming war against other European nations. The Americans' goal was to get France to accept terms of the Jay Treaty.
Instead of dealing with French foreign minister Marquis de Talleyrand in person, three intermediaries were sent to negotiate with the Americans. Jean Conrad Hottinguer (X) arrived first to deliver formal demands. Pierre Bellamy (Y) came soon after to reiterate Talleyrand's stance. Lucien Hauteval (Z) came last to state the Americans should pay money to the French or risk a war.
When correspondence reached America, Adams published these sensitive letters at the behest of Congress with the names X, Y and Z inserted into the text. America prepared for war as Congress was amazed by France's emboldened stance. Talleyrand backed down after realizing France could not risk an intercontinental war, and a new peace treated was signed in 1800.