America and France weren’t officially at war between 1798 and 1800. But it sure looked like they were.

This period, the result of a diplomatic faux pas, is known as the Quasi War. Its contemporaries knew it as “The Undeclared War with France,” the “Pirate Wars” and the “Half War,” according to Katie Uva, writing on the website of Mount Vernon, George Washington’s historic estate. John Adams was president during the Quasi War, which is not well-remembered today but which helped to shape American foreign policy. It forced the United States to reassess its Revolutionary relationship with France and helped the fledgling U.S.Navy gain experience, helpful in the War of 1812.

In the late 1700s, writes the State Department's Office of the Historian, the new post-Revolutionary French government, known as the Directory, was having money troubles. And France and the United States were in conflict over the States’ decision to sign a peace-establishing treaty with England. “While largely a commercial agreement,” writes Kennedy Hickman for ThoughtCo., the French saw this treaty as violating a previous treaty made with them during the American Revolution–the 1778 Treaty of Alliance.

At the same time, the States were refusing to make debt payments to the French government, arguing that the government they made the deal with during the Revolution was a different government than the current one and so the States weren’t obligated to pay.

This presented multiple problems for the French. So, writes the State Department's history office, the French government decided to kill two birds with one stone and seize a bunch of American merchant ships. Ready cash and a statement of force all rolled into one.

Adams sent three envoys to France in an attempt to cool things off, but at the time the French government was a post-Revolutionary den of intrigue and tense politics, and they found it hard going. In the end, France made a series of demands that the Americans were not willing to meet, and the two countries reached an impasse. Congress officially rescinded the Treaty of Alliance on this day in 1798.

It was a complicated situation. “The Quasi War was the first time that American neutrality, which had been championed by Washington as president, found itself under attack,” writes Mount Vernon. Adams was angered by the French demands, and after Congress read the letters he’d received from the American diplomats detailing their treatment, many other lawmakers were angry too.

The United States had an interest in preserving peace with both France and Britain, two superpowers who were at war with one another and had been for a long time. Both of those countries had historic interests in the States. At the same time, the young country was still establishing its foreign policy.

In his 1798 State of the Union address, Adams spent some time speaking about the Quasi War. Although both parties seemed to be interested in reconciliation, he said, “hitherto… nothing is discoverable in the conduct of France which ought to change or relax our measures of defense. On the contrary, to extend and invigorate them is our true policy.”

Among the other measures Adams took during the two years of the Quasi War was to bring George Washington out of retirement and reinstate him as Commander-in-Chief. Skirmishes at sea were fought between French warships and American sailors, according to Spencer Tucker in the Almanac of American Military History, and the States re-mobilized the Navy.

Despite this tension, cooler heads prevailed and the United States renegotiated the 1778 treaty with France, producing the Convention of 1800. Unlike the Treaty of Alliance, the Convention contained no declarations of alliance, and because it replaced the Treaty, the United States was no longer allied (on paper or otherwise) with France. “It would be nearly a century and a half before the United States entered into another formal alliance,” writes the Historian.

Of course, by 1800, Napoleon had overthrown the Directory and the United States was negotiating with yet another French government.