South Koreans watch the news in Seoul on Sept. 5, after North Korea reportedly launched three ballistic missiles. (Jeon Heon-Kyun/European Pressphoto Agency)

NORTH KOREA’S fifth nuclear test, on Friday, its largest yet, prompted South Korea’s president to describe North Korea’s ruler, Kim Jong Un, as “spiraling out of control.” There’s a basis for that: In defiance of mounting international sanctions, the Kim regime has now staged two nuclear tests in nine months, along with a steady stream of illegal missile launches. As South Korean leader Park Geun-hye put it, the young dictator “is not listening to any words from the international community or neighboring countries in his attempt to cling to power.”

It could be, as some South Korean analysts suggest, that the Kim regime is cracking — there have been several significant defections recently, and a senior official was reportedly shot by a firing squad several weeks ago. But more likely, Mr. Kim is firmly in control and overseeing a breakneck drive to develop a nuclear arsenal capable of directly threatening the United States. Pyongyang claimed the latest test confirmed its ability to produce miniaturized warheads capable of fitting on a missile — like the intermediate-range rockets North Korea has been testing. The last launch, just over two weeks ago, came from a submarine.

Western analysts used to dismiss North Korea’s tests as political stunts, meant to impress the domestic audience, capture international attention and leverage aid. Though the latest detonation came on a national holiday, that explanation is looking implausible. As it has frequently said publicly, the regime now aims to be recognized as a nuclear power and to acquire the ability to deter not just South Korea and Japan, but also the United States.

President Obama reiterated Friday that “the United States does not, and never will, accept North Korea as a nuclear state.” But Mr. Obama has failed to take the North Korean buildup seriously enough. For years, his administration pursued a policy of “strategic patience,” which mostly consisted of ignoring North Korea while mildly cajoling China to put more pressure on the regime. In February, Mr. Obama signed into law a bill pushed by congressional Republicans that gave him broad new powers to sanction North Korea and cut off its economic lifelines. The next month, the United Nations Security Council unanimously passed a resolution imposing new sanctions on the regime, including limits on its trade.

However, China has not aggressively implemented the U.N. sanctions — and Mr. Obama has not used the powers Congress gave him. As The Post’s Anna Fifield recently reported, customs data shows that China’s trade with North Korea in June was almost 10 percent higher than the previous year, in spite of the sanctions. Though the White House has issued executive orders sanctioning Mr. Kim and other senior leaders, congressional leaders point out that it has yet to penalize any Chinese companies or banks for continuing to do business with the regime.

The latest test will prompt some in the West to argue that the sanctions strategy isn’t working — which is exactly what the Kim regime (and China) wants. In fact, as the Iran nuclear diplomacy shows, sanctions can get results, but only if they are very tough and sustained over several years. That’s the strategy that Mr. Obama, and the president who succeeds him, need to embrace.