For those who worried about the risk of the Cold War ending in catastrophe, the early to mid-1980s were the most alarming period since the 1962 Cuban missile crisis.

On both sides of the Iron Curtain, paranoia and alarm about the adversary’s intentions was the order of the day. The United States and the Soviet Union were both deploying a new generation of medium-range nuclear rockets that experts worried could make it easier for a limited atomic war to escalate out of control.

The result, after almost a decade of diplomacy, was the 1987 Intermediate-Range Nuclear Forces Treaty, which culled an entire generation of missiles with a range of 500 to 5,500 km. It forced Moscow and Washington to rely on longer-range ballistic missiles and air-launched weaponry to maintain their nuclear “balance of terror,” making it easier for each side to track each other’s actions and get early warning of an attack.

This crucial confidence-building measure opened the door to further detente between the superpowers and ushered in three decades in which worries of global nuclear war all but vanished. But earlier this month the treaty finally collapsed completely amid wider international tensions, particularly between Washington, Moscow and Beijing.

The result may be a resumption of the kind of medium-range missile arms race the original treaty halted. In some respects the race is already underway and this looks set to complicate U.S. relations not only with its potential foes but also with some of its allies. Many allies are desperate for U.S. protection but are reluctant to host medium-range missiles that could put them in the firing line in a conflict.

Australia recently became the first major U.S. ally to rule out hosting intermediate-range missiles, though Australian leaders said they had not been asked directly by the U.S. if they would do so. South Korea quickly followed suit.

The collapse of the treaty had been a long time coming. Both the Obama and Trump administrations have long accused Russia of breaching the conditions of the treaty, particularly with what NATO says is Russia’s deployment of a land-based cruise missile system Washington refers to as the SSC-8.

The Pentagon told reporters earlier this month that the U.S. now intends to test a new medium-range cruise and ballistic missile of its own over the summer. The fact that it has them ready is a sign that Washington sees the treaty as unsalvageable.

Both those missiles will carry only conventional warheads, Washington says, but potential enemies are likely to be concerned that they could be adapted to carry atomic weapons. Russian and to a lesser extent Chinese medium-range rockets and missiles are widely believed to be nuclear-capable, Western arms experts say.

Moscow has also stepped up its military sabre-rattling and has held a series of weapons tests. The same is true of China, which was not part of the original 1987 treaty. U.S. President Donald Trump recently said he hoped the treaty could be replaced with a new tripartite agreement including Beijing. But Chinese officials were quick to dismiss the idea, saying the Chinese atomic arsenal remains substantially smaller than that of either the U.S. or Russia.

Russia and the U.S. each have about 1,550 deployed large strategic nuclear warheads capable of wiping out a city. The number is limited by the 2010 New Strategic Arms Reduction Treaty known as New START. China has fewer than 300. But in public comments in May at the Hudson Institute, a Washington think tank, the head of the U.S. Defense Intelligence Agency, Lt. Gen. Robert Ashley, said he expected China to double that number within a decade and to substantially increase its number of smaller “tactical” nuclear weapons.

Last year, he said, China launched more ballistic missile tests than the rest of the world combined. While Russia continued to abide by the terms of New START, it was taking steps to be able to dramatically increase its number of warheads in a time of crisis, he said. It is likely that Russian activities included low-yield nuclear tests banned by the Comprehensive Nuclear Test Ban Treaty, he said.

What is clear is that Moscow and Beijing take their nuclear weapons programs increasingly seriously. For China, that has included increased investment in ballistic missile submarines, which could enable it to join the U.S., Russia, Britain and France in the elite club of nations that always have at least one submarine offshore providing continuous hard-to-detect deterrence against any foreign nuclear strike.

Moscow has also been pouring resources into its larger nuclear force, including launching new submarines and both larger and smaller rockets. For much of the last decade, Western analysts have also been concerned by Russian interest in what they described as a “de-escalatory nuclear strike,” a plan under which Moscow would conduct a single nuclear strike after winning a more limited conventional conflict to force its enemies to back down.

The loss of the intermediate-range treaty may be only the beginning. The New START strategic arms treaty is due to expire in February 2021, and it remains unclear whether Washington and Moscow will be able to overcome their differences to extend it. That would remove restrictions on the largest nuclear weapons, and could spark an even wider arms race — or something worse.

Reuters columnist Peter Apps writes on international affairs, localization, conflict and other issues, He is the founder and executive director of the Project for Study of the 21st Century; PS21, a nonpartisan think tank.