Frontier foxtrot: Moon and Kim's unprompted DMZ dance

It was a historic handshake that Koreans had waited more than a decade to see -- and it sparked a completely unscripted dance, with the two leaders hopping back and forth over the border that divides their nations.

Everything about the inter-Korean summit had been minutely choreographed and rehearsed but the North's Kim Jong Un went off-script when he invited his southern counterpart Moon Jae-in to join him over the border.

After a prolonged clasp lasting almost half a minute over the Military Demarcation Line (MDL) that forms the border, a beaming Moon invited his guest over to South Korea.

They posed for pictures as Kim became the first Northern leader to set foot in the country since Korean War hostilities ceased in 1953.

Kim then beckoned Moon over to the other side. Moon seemed initially hesitant but the North's jovial young leader was not taking "no" for an answer, grabbing his hand and accompanying him across the border before they warmly shook hands again.

Grinning broadly, the pair then crossed back to the South hand-in-hand, to be presented with flowers by children from a village in the buffer area next to the Demilitarized Zone.

It all went to show that even for a moment as carefully planned as the first inter-Korean summit in more than a decade, where the North's nuclear arsenal will be high on the agenda, the best-laid preparations rarely run completely to schedule.

South Korean officials had carried out a full dress rehearsal on the eve of the summit, including stand-ins for the two leaders.

"We examined every single detail including lighting and flower decorations," a Moon spokesman said.

Even the smell of the summit room received careful attention, with officials "scattering onions and charcoal on the floors and running many electric fans to remove the odour" of new paint.

A North Korean security team made preparations of its own, Seoul said, sterilising the chair Kim was to sit in to sign a guest book and wiping down its seat, armrest and legs with a white cloth.

- Cold buckwheat noodles -

The welcoming ceremony dripped with symbolism as the two men walked down a red carpet through an honour guard of South Korean soldiers colourfully dressed in traditional uniform lifting up banners as they went through.

They were also greeted by a military band, Moon saluting and Kim standing rather awkwardly not quite to attention.

The pair seemed to share several relaxed moments, Kim at one point breaking into a laugh as Moon pointed something out with a gesture, and the visitor joking about noodles during his summit opening remarks.

The symbolism and bonhomie continued in the afternoon when the pair donned white gloves and grabbed shovels for a ceremonial tree-planting near the MDL.

They then repaired for an extended open-air one-on-one on a raised wooden platform for more than half an hour, Kim nodding attentively as Moon spoke.

Friday also brought moments of unexpected comedy as Kim's sister Kim Yo Jong and another delegation member following the two leaders realised they were in shot and wildly swerved off to the side.

There was some awkwardness too as Kim took an age to sign the guest book, with Moon standing by seemingly not knowing where to look.

Their lingering handshake contrasted sharply with the 2000 greeting between the current leader's father Kim Jong-il and Kim Dae-jung, a vigorous two-handed pumping affair lasting around five seconds.

The 2007 version was slightly more muted -- three seconds and only one hand -- as Kim Jong Il welcomed Roh Moo-hyun in Pyongyang.

The North has since made rapid progress in its weapons programmes, last year detonating its sixth and by far most powerful nuclear blast and launching missiles bringing the US mainland into range.

At times of tension, Pyongyang has threatened to unleash the "treasured sword" of its atomic arsenal and turn Seoul and the US into a "sea of flames".

But the image that lingered on Friday was that of the two leaders hand-in-hand, walking across the border to the South towards their summit.