The drumbeat for a potentially devastating war on the Korean peninsula, and one that could quickly spread with calamitous consequences, has grown louder in the wake of North Korea’s latest missile test – its most advanced yet. The North’s long-range inter-continental ballistic missile (ICBM) launch was in direct contravention of a battery of UN security council resolutions and in disregard for its increasingly estranged – and last remaining – ally, China.

Meanwhile, a major US and South Korean military exercise began today involving 12,000 military personnel and, for the first time, US F-22 “stealth” raptors, precision bombing aircraft that the North Korean regime has zero chance of spotting with its antiquated systems. In advance of the exercises, the North Korean foreign ministry said that the Trump administration was “begging for nuclear war”, while Trump’s security adviser, HR McMaster, speaking at the Reagan Defense Forum at the weekend, said that “North Korea is the greatest immediate threat to the US.”

At the end of a year of extraordinary brinkmanship, the desperately isolated regime in Pyongyang is in a last-ditch race to build a nuclear missile capable of reaching the US. This, it believes, is its only deterrent against regime change. It is also directed at a country that it is still officially at war with. North Korea also knows that its “million-strong” army of mainly conscripts will, despite their legendary fanaticism, be no match for the far better-armed forces of the US and its allies. North Korea suffers near-permanent fuel shortages, its ballistic missile programme a cover for army trucks whose petrol engines have sometimes been swapped for coal stoves. For an unpredictable US administration, there is an equal, deadly intent to prevent Kim Jong-un from reaching that final stage of rocket development – by force if necessary.

Last week John Bolton, the former US ambassador to the UN and a notable hawk from the George W Bush era, visited London and the House of Commons. His mission, whether official or not: to relay that CIA chiefs have told Donald Trump that he has a “three-month window” in which to act to halt the North’s ICBM programme, after which the North Koreans will have the capability to hit US cities, including Washington, with a nuclear payload.

This apparent March deadline, for what can only be considered a pre-emptive strike, was also mentioned to a former European parliamentarian by a senior US commander a few days ago at Panmunjom on Korea’s demilitarised zone, which separates the North from the South. With speculation rife that the CIA director Mike Pompeo may replace Rex Tillerson as US secretary of state, the stand-off seems likely to intensify, because Pompeo reportedly takes an even harder line towards North Korea.

The Trump administration still believes that China holds the key; that it can turn off the oil supplies that keep Kim Jong-un in power, and so bring about regime change. But for a deeply recalcitrant regime in Pyongyang that is believed to have stockpiled emergency supplies of oil for a year, this could edge it still closer to the precipice. And pretenders to Kim’s hereditary Marxist-Leninist throne who might have been favoured by the Chinese, such as Kim Jong-nam, his half-brother, and Jang Song-thaek, his uncle, have either been assassinated or executed. Direct talks between the US and North Korea are a prospect more distant than ever. The long dormant “six party talks” aimed at defusing the Korean nuclear crisis – involving the US, China, Russia, Japan, and South and North Korea – probably have even less chance of being reconvened.

Diplomacy may be the only way out of this swiftly developing crisis. But North Korea deeply distrusts the UN, while the Trump administration tolerates the UN only when it presents no challenge to US foreign policy. Such is the severity of the situation that now may be the time for China to take the initiative, and call on the UN secretary-general, António Guterres, to use his good offices, and those of his predecessors Ban Ki-moon and Kofi Annan, to pull both sides back from the brink and preside over UN-sponsored talks. These could also involve China and the European Union (which has acted as honest broker in the past), and eventually result in direct talks between the US and North Korea.

The opening ploys would be to end North Korea’s missile and nuclear testing in order for it to comply with UN security council resolutions, and in turn halt further US-led military exercises on the peninsula. No efforts should now be spared to prevent a slide to war – with utterly appalling consequences for the planet.

• Mark Seddon, formerly a speechwriter for the then-UN secretary general, Ban Ki-moon, is a visiting professor of international relations at Columbia University, New York