It seems somewhat remarkable that the first challenge in the area of immigration involved France, which had once been an ally in the Revolutionary War. But the France Adams knew was different that its former ally. The French Revolution had since occurred and while some Americans agreed with the notion of overthrowing a monarchy, many others were repulsed by the mass executions that occurred using the guillotine. Ultimately, relations between the two countries became strained, leading to what was known as "The Quasi-War", an undeclared war fought almost entirely at sea between the United States and France from 1798 to 1800. After the toppling of the French crown during the French Revolution, the United States refused to continue repaying its debt to France on the grounds that it had been owed to a previous regime. French outrage led to a series of attacks on American shipping.
Adams resolved to seek peace with France, rather than to continue hostilities. This hurt his popularity and played an important role in his reelection defeat. During Adams presidency, a debate occurred about what role, if any, the United States should have in the conflict in Europe, where Britain and France were at war. Hamilton and the Federalists supported Britain, while Thomas Jefferson and the Democratic-Republicans favored France. The French had supported Jefferson for president in 1796 and became belligerent at his loss. When Adams became president, he was determined to continue Washington's policy of staying out of the European war. The French saw America as Britain's junior partner and began seizing American merchant ships that were trading with the British. Ironically, most Americans had been pro-French due to France's assistance during the Revolutionary War. That soon changed after something called the XYZ Affair.
When American diplomats began to protest the seizure of American ships, the French demanded huge bribes before any discussions could begin regarding American complaints. An American diplomatic commission was sent to France in July 1797 to negotiate problems that were threatening to lead to war. The diplomats, Charles Cotesworth Pinckney, John Marshall, and Elbridge Gerry, were approached through informal channels by agents of the French Foreign Minister Talleyrand, who demanded bribes and a loan before formal negotiations could begin. Apparently this was not uncommon in mainland European diplomacy at the time, but the Americans were appalled and offended and eventually left France without ever engaging in formal negotiations.
The failure of the commission caused a political firestorm in the United States when the commission's dispatches were published. Federalists took advantage of the national anger by building up the nation's military. They also attacked the Jeffersonians for their pro-French stance. This weakened popular American support of France. The pro-French Jeffersonians lost support. The affair heightened fears of sedition by the administration's opponents and legislation was introduced in response. The president knew that America would be no military match for France in a conflict. Instead, Adams pursued a strategy in which American ships harassed French ships in an effort sufficient to stem the French assaults on American interests. This was the undeclared naval war between the U.S. and France that became known as the Quasi-War.
Because of the danger of invasion from the more powerful French forces, Adams and the Federalist congress built up the army, bringing back Washington as its commander. Washington wanted Hamilton to be his second-in-command and Adams reluctantly agreed. It soon became apparent that Hamilton was truly in charge due to Washington's advanced years. Adams also rebuilt the Navy, adding six fast, powerful frigates, most notably the USS Constitution.
By building a large standing army, Hamilton's supporters raised popular alarms and played into the hands of the Democratic-Republicans. They also alienated Adams and his large personal following.
Some pro-French Democratic-Republicans even fostered a movement in America, similar to the French Revolution, to overthrow the Federalists. It appeared for a time that civil war might break out in the United States as some Democratic-Republicans refused to enforce federal laws, and some Federalists threatened to send in an army and force them to follow the law. Some calls for secession began. The Federalists accused the French and the French immigrants in the United States of provoking civil unrest in the United States. In an attempt to quell the uprising, the Federalists introduced, and the Congress passed, a series of laws collectively referred to as the Alien and Sedition Acts, which were signed by Adams in 1798.
Congress specifically passed four measures – the Naturalization Act, the Alien Friends Act, the Alien Enemies Act and the Sedition Act. The Naturalization Act increased the period of residence required for an immigrant to attain American citizenship to 14 years. At that time, immigrants who attained citizenship tended to vote for the Democratic-Republicans. The Alien Friends Act and the Alien Enemies Act gave the president the power to deport any foreigner (in the case of the former act, from friendly and in the case of the latter, from hostile nations) if the President considered such person to be dangerous to the country.
The Sedition Act was especially controversial because it put restrictions on free speech. This law made it a crime to publish "false, scandalous, and malicious writing" against the government or its officials. Punishments included 2–5 years in prison and fines of up to $5,000. Although Adams had not pushed for passage of any of these acts, he signed them into law.
The acts became controversial because of the manner in which they were applied. The Federalist administration initiated fourteen or more indictments under the Sedition Act, as well as prosecutions against five of the six most prominent Democratic-Republican newspapers. The majority of the prosecutions occurred in 1798 and 1799, and came to trial just as the 1800 presidential election was taking place. In total there were only 10 convictions under the Sedition Act.
Adams never signed a deportation order under either the Alien Friends Act or the Alien Enemies Act, but some historians argue that these acts caused many aliens to leave the country. In the election of 1800, these four acts of Congress became an issue in a bitter and volatile election, with each side expressing extraordinary fear of the other and its policies.
In February 1799, Adams sent diplomat William Vans Murray on a peace mission to France, now ruled by the Emperor Napoleon. Napoleon had expressed his willingness to resume friendly relations with the United States. This resulted in the Convention of 1800 which permitted Adams to avoid war, though he did so at a political price. The United States was then free of foreign entanglements, as Washington had wished for in his farewell address.