The XYZ Affair was a national and diplomatic incident in the years 1797 and 1798. The same was the period of the presidency of John Adams. During this time, the XYZ event took place between the diplomats of the United States and France. It resulted in the Quasi-war which was a limited and undeclared war. However, during the course of time, the United States and French mediators reestablished a friendship with the treaty of Mortefontaine.