The XYZ affair was a political and diplomatic incident which occurred during the administration of John Adams. American diplomats were sent to France to avert hostilities between the two nations. The diplomats were approached by agents who demanded bribes and a loan before negotiations could begin. This incident led to the Quasi War (1798-1800) and served as an excuse for federalists to build up the army.