When Adams entered office, the ongoing war between France and Great Britain was causing great difficulties for American merchants on the high seas and arousing intense partisanship among contending political factions nationwide. Attempts to negotiate with the French led to the XYZ Affair, in which French officials demanded bribes before they would assent to the beginning of negotiations. The XYZ Affair outraged the American public, and the United States and France engaged in an undeclared naval conflict known as the Quasi-War, which dominated the remainder of Adams's presidency. Adams presided over an expansion of the army and the navy, and the navy won several successes in the Quasi-War.