South Korean troops on Sunday exchanged fire with a runaway soldier who was surrounded in a forest after he killed five comrades near his North Korea border outpost, and brought in his parents to persuade him to surrender, a defence official said.

One platoon leader was wounded when the sergeant, identified only by his surname Yim, threw a grenade and fired on the military personnel closing in on him, according to a defence ministry official who asked not to be named, citing department rules. The official said troops fired back.

Villagers in a nearby area were warned not to leave their houses. The village head, Jang Seok-kwon, said that he heard gunshots ring out about 10 times Sunday.

The military brought Yim's parents to the forest about 10 kilometres from the border outpost to try to persuade him to give up, the official said.

Yim opened fire Saturday night with his standard issue K2 assault rifle at the outpost near the North Korean border in Gangwon province, east of Seoul, killing five fellow soldiers and wounding seven others, the military said.

Yim, who was scheduled to be discharged from the military in September, fled with his weapon, but it wasn't clear how much live ammunition he had.

A Defence Ministry official confirmed Yim was considered a "protected and watched-on soldier," which means he needed special attention among servicemen. According to the official, the South Korean military assigns such status based on servicemen's periodical personality test.

Yim was designated a grade A protected soldier in April last year - one with a high risk of suicide attempt or inducing other accidents who could not serve at heavily guarded outposts - then improved to grade B status last November. It means he was being watched with focused attention, but could serve at the outposts at the commander's discretion.Thousands of troops from the rival Koreas are squared off along the world's most heavily armed border.

There was no indication that North Korea was involved. But tensions between the two countries have been high recently, with North Korea staging a series of missile and artillery drills and threatening South Korea's leader. The Koreas have also traded fire along their disputed maritime border in the Yellow Sea. South Korea has repeatedly vowed to respond with strength if provoked by the North.

Shootings happen occasionally at the border.

In 2011, a 19-year-old marine corporal went on a shooting rampage at a Gwanghwa Island base, just south of the maritime border with North Korea. Military investigators later said that corporal was angry about being shunned and slighted and showed signs of mental illness before the shooting.

In 2005, a soldier tossed a hand grenade and opened fire at a front-line army unit in a rampage that killed eight colleagues and injured several others. Pfc. Kim Dong-min told investigators he was enraged at superiors who verbally abused him.

All able-bodied South Korean men must serve about two years in the military under a conscription system aimed at countering aggression from North Korea.

The Korean Peninsula is still technically in a state of war as the 1950-53 Korean War ended with an armistice, not a peace treaty. About 28,500 US soldiers are stationed in South Korea as a deterrent against North Korean aggression.