The XYZ Affair was a diplomatic episode in 1798 that worsened relations between France and the United States and led to the undeclared Quasi-War of 1798. John Jay's Treaty of 1794 angered France, which was at war with Great Britain and interpreted the treaty as evidence of an Anglo-American alliance.