France was displeased with the United States' refusal to honor the Franco America Alliance of 1778, and this displeasure deepened after the ratification of Jay's Treaty in 1795. The tension ultimately resulted in the Quasi War with France in 1797-1800 (quasi means "resembling" or "seeming"). Before leaving office, George Washington attempted to relax tensions by dispatching an envoy, Charles Cotesworth Pinckney, to France. Pinckney not only was not received by the French officials, but was threatened with imprisonment. These events led to the infamous XYZ Affair. The Hamiltonian Federalists, always critical of France, forced incoming president John Adams to recruit an army in preparation for war with France. Washington agreed to act as titular commander, but the real power was to be vested in Hamilton. Where such a war would be fought was an inconvenient detail; the United States was unlikely to invade France and the only French forces in America were stationed in faraway Louisiana. Adams was more enthusiastic about a naval buildup, given that the real difficulties existed on the seas. Congress established the Department of the Navy and authorized construction of 40 ships; the nation had only three ships in its navy under Washington. These preparations, plus America's close working relationship with Britain, brought the new Napoleonic government around to seek a diplomatic resolution. In 1799, Adams sent a new mission to France, again angering the High Federalists. The result was the Convention of 1800 (or the Treaty of Mortefontaine), which ended the Quasi War by formally cancelling the alliance of 1778 and improving commercial relations between the two parties. The efforts of John Adams to keep the weak young country out of war with France were extremely important and may well rank as his prime achievement as president.