COOL heads are required if rising tensions in the Korean peninsula are to be contained.

That is not easy when one of those heads – that of North Korea's young dictator, Kim Jong-un – seems to get hotter every day.

The news that the North has transferred two missiles to the coast and installed them on mobile launchers suggests that the escalation of threats has gone about as far as it can without spilling over into bloodshed. Though there are few signs of mass mobilisation in Pyongyang and it is currently inconceivable that Mr Kim is capable of unleashing the nuclear Armageddon he threatens against South Korea and the United States, nobody should underestimate the possibility of the situation spiralling into a bloody conflict almost by accident. The knock-on effects of such a conflict on the thriving Asian economy would be disastrous.

Students of Korean affairs recognise a pattern to current events and argue that the dictator, just like his father and grandfather before him, is ratcheting up international tension in order to extract aid and oil in return for the promise of concessions on North Korea's nuclear programme. Maybe, but the tone is different this time. It takes place against the backdrop of a power struggle among the top ranks of the military and Kim Jong Un lacks the diplomatic skills of his predecessors. He knows that if he loses face, it could cost him his life. So we are shown carefully staged film of the tubby baby-faced ruler pointing at maps and appearing to discuss tactics with his generals. The scenes are reminiscent of young men who enjoy playing war games but as UN Secretary-General Ban Ki-moon warned this week, "the nuclear threat is not a game".

Mr Kim's ever wilder threats present a challenge to both the South and the US. They cannot appear complacent in the face of these threats but risk contributing to their escalation if they respond firmly, as both have done this week.

There has been one encouraging development. The latest stand-off has provided a rare opportunity for the US and China to build bridges through the medium of the UN. They have a mutuality of interest in maintaining stability in the region. China has no desire for North Korea to collapse, sending millions of refugees fleeing across its borders. Hence Beijing's rebuke to the pariah state for its "regrettable" moves. Last month China chose to support the UN Security Council resolution imposing tougher sanctions against North Korea. Much depends on whether they can be made to bite, which in turn depends on China, which needs encouragement to act as a broker to start dialogue without preconditions. Mr Kim can then pull back, claiming that he has prevailed, while Barak Obama has conceded nothing.

The situation reminds us that, for all its faults and anachronisms, the UN is still the best vehicle the world has for resolving dangerous international tensions. It urgently requires reform, including the Security Council, whose membership must be brought in line with the global geopolitics of the 21st century, whatever the cost to its current permanent members.