On Tuesday, a spokesperson for the U.S. Pacific Fleet said that a Chinese warship got close — too close — to the U.S. warship the USS Decatur in the South China Sea. Although this time nothing happened, a similar incident could easily cause a devastating accident and one that would escalate growing tensions between Beijing and Washington. If and when that happens, the U.S. needs to have a clear plan and be prepared to respond.

The USS Decatur was conducting a routine freedom of navigation exercise in the South China Sea where China has recently made aggressive moves to fortify islands and reefs and pursue territorial claims. The U.S. and its allies don’t recognize Chinese control of that part of the ocean and instead consider it international waters — hence the freedom of navigation exercise.

Beijing has a different view. It views the fortified islands as part of China, meaning that the surrounding water is also under Beijing’s jurisdiction. Encroaching U.S. ships are seen as an infringement on sovereignty that must be countered.

Clearly, these contradictory views create a tense environment. Those tensions spilled over, resulting in the USS Decatur coming within 45 yards (that’s really, really close) of the Chinese ship, a Luyang-class destroyer.

Although there is plenty to debate on an appropriate overall strategy towards China, one thing is clear: The U.S. must have a plan on how to respond to an accident born out of tensions.

Given the history of accidents sparking conflict with China, this should not be taken lightly. A key tenet of the modern Chinese Communist Party and its claim to power is its rhetoric of the Great Rejuvenation of the Chinese Nation. And a key underpinning of that policy is overcoming what is known as the "century of humiliation" and restoring China’s standing on the world stage.

Part of that rhetoric of that means rejecting unfair conditions imposed by foreigners on Chinese soil — or claimed territory.

To understand why this is so important requires looking all the way back to 1784, when a British ship, the Lady Hughes, fired a salute about 12 miles downriver from Canton harbor (today known as Guangzhou) to a departing Danish ship. That shot hit a small Chinese boat, injuring three Chinese men, two of whom later died. While popular history accounts the deaths of the Chinese sailors as accidents, recent evidence suggests that the gunner likely did notice them and was ordered by a superior to fire anyway.

At the time, Chinese law stipulated that the person responsible, in this case a British gunner, had to stand trial. The foreigners at first refused to hand over the gunner who had fired that deadly salute. Eventually, he was handed over, but not before a higher-ranking officer on that British ship was essentially kidnapped and held hostage until the foreigners complied.

That, in turn, prompted the foreigners to mount a display of force calling up armed boats. Of course, that sparked worry from Chinese officials, who cut off communications between the foreigners on shore and their ships of armed men, further escalating tensions. The incident also meant that the lucrative trade came to a grinding halt until the gunner was handed over, adding additional pressure.

Eventually, the gunner, or potentially a scapegoat, was handed over to stand trial. On orders from Beijing, he was executed for the offense by strangulation — an outcome that the foreigners were sure wouldn’t happen. Making the situation worse, his fellow foreigners were only notified of the outcome of the trial after the execution had already taken place and after they had already sent word back to Europe of the success of their negotiation.

The upshot of this incident was that the British response became one of force characterized by distrust of Chinese legal system and endless critiques of unfair behavior — narratives probably based less on fact than on their preferred form of engagement with China.

Eventually, that approach led to the Opium Wars in the 19th century. The outcome of these was profoundly unfair to China and resulted in unequal treaties, the forcible sale of opium, and the principle of extraterritoriality that meant that foreigners who committed crimes in China would not be subject to Chinese law.

This period has since become a key part of the narrative of Chinese nationalism, and this nationalist rhetoric is part of how Beijing today legitimizes its authority. The prospect of giving even an inch to Western pressure on its own claimed territory could therefore have serious political consequences. It should also be noted that the massive force and war waged by the British in the 1700s is clearly no longer an option for Western powers — China today is a much more formidable and prepared foe.

That historical dimension colors the seriousness of the confrontation in the South China Sea, and means that the stakes are considerably higher than just a dangerous encounter. Accidents, or alleged accidents, and the politics that surround them must not be taken lightly.

Moreover, China has rapidly gained economic and military strength. It is in a far different position than in 2001, when a U.S. spy plane was stranded on a Chinese island after a midair collision with a Chinese jet. This question also came up then, but it was eventually smoothed over without additional conflict.

In the modern era of heightened tensions, escalating trade wars and President Trump's unpredictability, there is no guarantee that what could be smoothed over in 2001 could be smoothed over today.

The incident with the USS Decatur in the South China Sea should be a clear warning that the U.S. must not only have a plan to respond to an accident that could arise in such a situation, but also be prepared to act, and preferably not in such a way that leads to an armed conflict.