Media playback is unsupported on your device Media caption A rare instance of a defector fleeing through the demilitarised zone was captured on CCTV in 2017

Extraordinary footage of the recent defection of a North Korean soldier across the border to the South has been released.

On 13 November the soldier drove up to the border within the Joint Security Area (JSA) and then sprinted to the other side, a hail of bullets following him.

The JSA is the only place in the 250km (155-mile)-long Demilitarised Zone (DMZ) where soldiers from both sides face each other. Located in the village of Panmunjom, it's a popular tourist attraction for South Koreans.

The UN Command, which oversees the military forces supporting South Korea, said the footage showed clear violations of the armistice brokered after the Korean War, with North Korean soldiers firing across the border and crossing the demarcation line.

But it also provides a rare insight into what happened during the defection and how each side coped.

The defector was very close to getting caught

Watching the CCTV footage, it seems extraordinary the soldier survived the daring escape. North Korean guards reach him just seconds after he flees from the vehicle once it crashed and proceed to fire at him from very close range.

He runs across a road and collapses metres away, only just out of their reach in the South and under cover of the low perimeter wall of what looks like South Korea's Freedom House complex.

Image copyright UN Command Image caption The defector was seen lying by the side of a low wall, in a pile of leaves

There are no apparent physical obstacles to escape

In his vehicle, the soldier zooms past what appears to be a North Korean checkpoint, driving right up to the border before getting out and simply running across to the South.

He could very well have driven right across if his vehicle had not broken down at the end, when a wheel reportedly fell off.

Image copyright AFP/Getty Images Image caption Freedom House is a building erected on the South Korean side of the JSA

The DMZ is heavily fortified, but at the JSA there are none of the visible fences, concrete bollards, or conspicuous obstacles that one might expect at the border of two countries which are technically still at war.

Even the North Korean checkpoint did not appear to have a gantry barrier.

But this can be traced back to the original purpose of the JSA as defined by the armistice, Yang Uk, a senior researcher at the Korea Defense & Security Forum, told BBC Korean.

"The area was established to build up a neutral ground for armistice committee talks," which, he says, used to be held regularly. It was a place where the two militaries actually worked together.

"The military of North and South worked together in the JSA, which is self-evident in what it stands for - Joint Security Area."

It was originally laid out more ambiguously, but a 1976 skirmish known as the "axe murder incident", when North Korean soldiers killed US soldiers trimming a tree, resulted in new rules where both countries' militaries had to keep to their side.

Nevertheless, he adds, there are few places to hide. Freedom House, on the southern side of the border, has only one entry point in the centre of its southern side - so it would be hard for a defector from the North to hide in the building.

Map: How the dramatic escape unfolded

1. The North Korean defector soldier crashes his vehicle after a wheel apparently comes off.

2. North Korean guards begin to race down from the Panmun Gak building to investigate events.

3. A North Korean guard rushes out from the guard house in the west of the complex.

4. Another North Korean soldier who has given chase realises he has crossed into the South and swiftly turns back.

5. The defector collapses in a pile of leaves against a low wall close to South Korea's Freedom House.

Another North Korean soldier briefly crossed the line

One border guard gave chase, before stopping abruptly as he realised he had trespassed into the South. He turns around and runs back to his comrades who are hiding behind a guard post.

The UN Command said this was a technical breach of the armistice agreement.

But in fact, the Military Demarcation Line, a temporary administration line dividing North and South Korea, appears not to be visibly demarcated throughout the JSA.

The area contains a row of six buildings straddling that line, which is represented by raised concrete strips in the gaps between each structure.

Image copyright AFP/Getty Images Image caption In this file picture North Korean soldiers are seen standing by a raised concrete strip representing the military demarcation line

But in the footage released by the UN Command, the defector runs across a grassy patch next to one of the buildings. The border guard does not seem aware he has trespassed until he is over on the South's side.

There are strict rules about military engagement in the JSA

The UN Command said on Wednesday that the North Korean guards had breached rules by firing at the defector in the direction of South Korea within the JSA.

In the 1953 armistice, which ended the Korean War with a truce, both sides agreed not to "execute any hostile act within, from, or against the demilitarised zone".

The US forces spokesman working under the UN command said the South showed "admirable restraint" by not returning fire.

It told the BBC that the findings of their investigation were relayed to the North in "the usual way" - reading them across the line while the North Koreans recorded from the other side.

It is now just waiting to hear if the North is willing to meet and discuss the incident and ways to avoid repeats.

It's a rare insight into North Korean rapid response

Throughout the incident, the North's security forces are visibly well armed, but their response appears confused.

Early in his escape, they had a chance to stop the soldier at a checkpoint, but he instead sped past while a checkpoint guard appeared to panic.

Image copyright UN Command Image caption The checkpoint guard chased after the vehicle briefly

Then there was the border guard's intrusion into the South, and the soldiers' firing at the fleeing defector - either these were accidents and they forgot protocol in the confusion or took the decision to breach the rules.

In the immediate aftermath, a cluster of North Korean soldiers is seen milling about on their side of the JSA looking unsure, before walking off. One is even seen putting down his rifle to adjust his shoe or trouser leg.

The weaponry was a point picked up by some analysts.

"In theory, only the pistols are allowed... in the JSA for self-defence. In practice, however, [North Korean] soldiers have been seen carrying bigger firearms so the South Korean military also has prepared heavy firearms in the case of... aggression," Yang Uk told the BBC.

Image copyright UN Command Image caption The North Korean soldier, seen crouching by the far left of the group, put down his weapon for several minutes

According to the UN Command, the South Koreans had a plan and worked quickly to recover the defector without knowing if he was booby trapped.

After waiting for about 40 minutes, two South Korean soldiers stealthily crawl towards the defector and drag him away.

Image copyright UN Command Image caption Infra-red cameras showed South Korean soldiers dragging the North Korean defector away

Defections across the demilitarised zone, let alone the JSA, are very rare - and none have been quite as dramatic as this.