The XYZ Affair was a political and diplomatic episode in 1797 and 1798, early in the administration of John Adams, involving the United States and Republican France. Its name derives from the substitution of the letters X, Y and Z for the names of French diplomats in documents released by the Adams administration.