A North Korean soldier has escaped to the South across the heavily-guarded Demilitarised Zone that divides the peninsula, triggering gunfire on both sides of the border, in the second defection in successive months.

The "low-ranking" soldier was spotted by South Korean soldiers using surveillance equipment as he crossed the midwestern part of the land border in thick fog and made his way to a guard post, a spokesman for Seoul's defence ministry said.

There were no shots at the time, he said, but about 90 minutes later South Korean troops fired around 20 rounds from a K-3 machine gun to warn off Northern guards who approached the border apparently looking for their comrade.

Two bursts of gunfire were later heard in the North, the spokesman said, but there were no indications of any bullets crossing the border.

The latest incident comes a month after a rare and dramatic defection by a soldier at Panmunjom, the truce village where opposing forces confront each other across a concrete dividing line.

On that occasion, the defector drove to the heavily-guarded border at speed and ran across under a hail of bullets from his own side. He was hit at least four times.

Footage showed the badly injured man being pulled to safety by two South Korean soldiers who crawled to reach him just south of the demarcation line.

He has since been recovering in hospital in the South.

Today's defection was the fourth by a soldier across the DMZ this year.

Two North Korean civilians also defected this week after being found drifting in a rickety engineless boat off the South's eastern coast, Yonhap news agency reported, citing the Unification Ministry, which handles relations with the North.

They were spotted by a South Korean surveillance aircraft and picked up by a nearby navy vessel, it said.

The developments bring this year's total for the number of people defecting directly to the South to 15, which is three times as many as 2016.