It was a historic moment replete with grand pledges and theatrical gestures of friendship. A North Korean leader crossed into the South for the first time since the Korean war, which halted 65 years ago with an armistice but no peace treaty. At the demilitarised zone, a strikingly confident, buoyant Kim Jong-un received not just a handshake but a hug from his counterpart, Moon Jae-in; and took his hand to draw him into the North briefly.

“The two leaders solemnly declared before the 80 million Korean people and the whole world that there will be no more war on the Korean peninsula and thus a new era of peace has begun,” the joint declaration said. It vowed to pursue talks to declare a formal end to the war, turning the armistice into a peace treaty and establishing a permanent and solid peace regime.

All this is welcome, especially given that Donald Trump is due to meet Mr Kim next month. But it looked good in part because things have been so bad. Only a few months ago, North Korean missile tests and Mr Trump’s threats of “fire and fury” caused alarm across the region.

In fact, the images of the smiling North and South Korean leaders holding their joined hands aloft were almost identical to those of Mr Kim’s father and Mr Moon’s predecessors at summits in 2000 and 2007. Mr Kim nodded to that: “Rather than create results we won’t be able to carry out like in the past, we should make good results by talking frankly about current issues,” he said.

And just read the small print. The path ahead has plenty of obstacles. As the communique states, a peace treaty to formally end the war will require trilateral or quadrilateral talks, drawing in the United States and probably China. Other players are watching closely: Japan is increasingly edgy, fearing that the US is neglecting its interests. Though the statement confirmed the two sides’ common goal of denuclearising the peninsula, Mr Kim did not mention it in his remarks. And for North Korea, that goal includes the removal of the US nuclear umbrella.

One important question is who believes they are driving the agenda. Mr Trump, of course, believes his bellicosity has achieved this. But Mr Kim might well think that the progress in his weapons programme has been key. The second key question is whether Washington and Pyongyang can trust each other. Previous deals have ended in failure. The US, understandably, has deep suspicion about whether North Korea’s engagement drive is merely tactical: is it just buying time while continuing on its course? It is far from clear whether even a freeze of the nuclear programme would be fully verifiable.

But even if offered some kind of security guarantee, North Korea has every reason to distrust the US, with its history of pursuing regime change – and never more so than now. An erratic, volatile president is surrounded by hawks such as Mike Pompeo and John Bolton. The administration repeatedly threatens to pull out of the Iran nuclear deal. Why should a signature on a Korea pact be more permanent?

The turnaround in recent months has been astonishing. But it should serve as a reminder that things could deteriorate with equal speed. The meeting’s success owes much to Seoul’s groundwork. Though Mr Trump applauded it, we do not know his intentions for the approaching summit, and on previous form it is likely that he doesn’t either. His administration has started late and lacks expertise: swanning in and quoting The Art of the Deal won’t cut it. Elevating talks to leadership level so quickly means that if things go wrong, there are few paths ahead. Steps forward can quickly be followed by backwards slides.