South Korean soldiers ride a military truck

North and South Korea wrapped up marathon talks Tuesday with an agreement aimed at defusing a crisis that had pushed the two rivals to the brink of armed conflict.

The South's lead negotiator, National Security Adviser Kim Kwan-Jin, said the North had agreed to a key demand to voice "regret" over recent mine blasts at the border that maimed two South Korean soldiers.

In response, the South conditionally undertook to halt loudspeaker propaganda broadcasts into North Korea.

The two also agreed to work towards a resumption next month of reunions for families separated by the 1950-53 Korean War, Kim told reporters.

The negotiations in the border truce village of Panmunjom had played out against a dangerous military stand-off, which triggered a rare artillery exchange over the border last week and saw North Korean leader Kim Jong-Un order his frontline troops onto a war-footing.

The talks had begun early Saturday evening, shortly after the passing of a North Korean deadline for Seoul to halt its propaganda broadcasts or face military action.