After several days of bluster and posturing North Korea and South Korea pulled back from the brink of war yesterday when their delegations met at the Panmunjom truce village straddling the border between the two countries. It was a near-run thing. Tensions on the Korean peninsula had been running high since Thursday following an exchange of artillery fire initiated by North Korea and returned with interest by the southern neighbour. Bellicose rhetoric from the rival capitals only served to increase the pressure

For 48 hours it really did look as if the countries would return to the state of war which ran from 1950 to 1953 and never officially came to an end. It was the most serious crisis between the two countries since Kim Jong Un came to power in 2011 as the Supreme Leader of the Democratic People’s Republic of Korea (North Korea) and it reawakened fears that a full-scale war was in the offing. As part of the mind games Kim ordered his forces to be “fully ready for war” while his officials warned that the presidential residence in Seoul would be turned into “a sea of fire”.

The cause was a South Korean decision to use powerful loudspeakers to broadcast propaganda across the border but this in turn had been provoked by the maiming of two soldiers who had wandered into a North Korean minefield during a routine patrol along the demilitarised zone (DMZ) separating the two countries. During the shellfire very little harm was done on either side of the border but this was not about physical damage. It was all about hurt pride.

In theory both countries are still at war, the 1953 ceasefire being merely a truce, and over the years there have been a number of incidents which have raised the temperature, the most recent being in 2010 when a South Korean warship was sunk in the Yellow Sea with the loss of 46 lives. It was widely believed that the culprit was a North Korean submarine and the incident was followed by the bombardment of a remote island, again with the loss of South Korean lives.

The vitriol is not been assuaged by the fact that South Korea’s main ally is the US which always offers staunch support to Seoul while in recent years China has been decidedly lukewarm in in its friendship with North Korea. On that score it has not helped matters that South Korean and US forces are currently engaged on Exercise Ulchi Freedom Guardian which runs until this Friday and which includes a simulated response to a cross-border invasion. Seoul and Washington both deny that there is anything sinister in the exercises which are held annually but North Korea always claims that they are cover for a real attack.

All this helps to explain why yesterday’s talks in Panmunjom were not a polite diplomatic chit-chat but a last-ditch attempt to prevent a cross-border incident escalating into total war. It might seem almost laughable that the targets were South Korean loudspeakers blaring out propaganda but the reality is that these are known to enrage Kim who resents invidious comparisons being made with the southern neighbour – one of the primary aims of the broadcasts. He knows that Seoul is only 25 miles away from the border and that it is one of the richest cities in Asia while his own capital Pyongyang is one of the poorest.

In other words the talks were not just about who did what to whom – North Korea has denied planting the offending land mines – but they were most certainly about saving face. Each side had to return from Panmunjom thinking that they had won or just as importantly had not lost during the tense negotiations. So far cool heads have prevailed but the stakes have not been lowered. North Korea has nuclear ambitions and has shown that it is not averse to sabre-rattling as it showed last year when it launched a cyber-attack on Sony for producing a film which seemed to insult Kim. That, too, was a ludicrous episode but as last week’s crisis showed there is always a danger along the DMZ that threats can all too easily escalate into something much more dangerous.