FOR hundreds of years Korea was China’s vassal state. Then it came under the heel of imperial Japan at the start of the 20th century. After Japan’s defeat in 1945 the Soviet Union occupied northern Korea. That led to the creation of the implacably hostile North Korea, an existential threat to the South ever since. America has acted as the South’s guarantor, keeping tens of thousands of troops there since the Korean war ground to a bloody halt in 1953. The South swings between resenting the American presence and worrying that it might come to an end.

South Korean officials, in short, have long had plenty to worry about. But their angst these days is unusual in its intensity. Life in Seoul may be carrying on as normal, with pop-up food stalls doing brisk business and rock bands performing lustily in open spaces, but the nuclear-armed North, 60km (35 miles) up the road, is looming especially large in policymakers’ minds.

The threat from the North has always been tangible. For years, its commandos would slither across the demilitarised zone to launch unnerving attacks, such as the one in 1968 that targeted Park Chung-hee, South Korea’s strongman, in the presidential Blue House in Seoul (it failed). More recently, in 2010, a North Korean submarine sank a South Korean naval vessel, the Cheonan, killing 46 seamen. Nor is the nuclear threat new. North Korea’s nuclear programme has been decades in the making. Its first, shocking nuclear test was ten years ago—half a lifetime for the young couples grazing at Seoul’s food stands.

Yet in recent months something has changed. Kim Jong Il, whose regime was responsible for the first test and who died in 2011, had only a rudimentary nuclear device, useful mainly for blackmail. Under his son, Kim Jong Un, the programme has rapidly gathered pace, with two nuclear tests this year alone. The North has also conducted 21 missile tests this year, including one from a submarine—a first. The ability to miniaturise a tactical nuclear weapon on a working missile could be just two or three years away, with an intercontinental ballistic missile capable of hitting California possible in five years’ time. Chun Yung-woo, a South Korean former national security adviser, talks of “growing outrage…after five tests, a change of mood, a sense of urgency.”

Once, it was possible to hope that the North’s isolated regime would implode under its own contradictions before it gained a proper nuclear capability. But the spread of informal markets and, for some North Koreans, a measure of prosperity may have strengthened the regime’s chances of survival. A consensus in Seoul is forming that Mr Kim now aims to dictate events on the peninsula—including the ability to demand that the Americans leave. One senior foreign diplomat in Seoul says that for the first time he hears people wondering openly whether there will be a major conflict on the peninsula in their lifetime.

Officials under President Park Geun-hye (daughter of Park Chung-hee) direct their frustration at China. For most of her nearly four years in office, Ms Park has wooed China’s dictator, Xi Jinping, partly to promote economic ties, and partly in hopes of making China acknowledge South Korea’s concerns over the North. In particular, if China enforced existing UN sanctions on North Korea, the regime would be feeling the pain—nine-tenths of all North Korea’s trade is with its giant neighbour.

As she leaned to China, relations with Japan grew bitter over issues to do with colonial history. Recently, though, she has leaned the other way. China has not allayed South Korea’s concerns. Indeed it has loudly criticised Ms Park’s go-ahead for an American high-altitude missile-defence system in her country. As for South Korea’s economic relationship with China, it too has changed. Mutual opportunities are now overshadowed by competition as China develops the same industries that are central to South Korea’s economy, such as shipbuilding and steel.

Meanwhile, South Korea’s relations with Japan seem to be improving fast. Late last year Ms Park and Shinzo Abe, Japan’s prime minister, sought to settle once and for all the matter of the Korean women, some of them still alive, who were forced to work in Japanese military brothels during the war. The two sides are even exchanging intelligence about North Korea.

Ms Park’s government has also been trying to persuade America to punish China for failing to rein in the North. America could blacklist Chinese state enterprises and banks doing business with the North, for instance. (It has just announced sanctions on one Chinese firm, but only after the Chinese authorities themselves had moved against it.) That would immediately exclude the miscreants from global payments systems and trading networks. But America is reluctant. After all, tensions in the South China Sea are already headache enough, while it wants to co-operate with China on other topics, such as climate change.

That leaves South Koreans worried about the commitment of their American ally. Donald Trump’s threats to pull American troops from South Korea have hardly helped. A President Hillary Clinton would certainly reassure. But the nagging fear of an eventual American withdrawal, perhaps as part of a power-sharing agreement with China in Asia, still gnaws at South Korea.

Thinking some unthinkables

Meanwhile, the North Korean threat grows. There is talk of urging the Americans to shoot down the missiles North Korea keeps testing in breach of UN sanctions, despite the risks to the South of retaliation from the North. There is even a revival of the debate about South Korea developing its own nuclear weapons—a majority of South Koreans polled are in favour.

Scratch a South Korean, says the foreign diplomat, and he will be unsure of America’s commitment, ready to believe that Japan might turn aggressive again, resentful that China ignores his country’s concerns and alarmed by a dangerous North Korea. South Korea, he adds, “looks a fundamentally lonely place.”