A South Korean soldier who killed five members of his unit has been captured after a failed suicide attempt, defence officials say.
The soldier, identified only as Im, shot himself in the chest and was being sent to hospital, they said.
His capture ends a tense stand-off in a forest near his outpost by the border with North Korea.
On Saturday evening Sergeant Im shot and threw a grenade at soldiers before fleeing with his rifle and ammunition.
Seven others were injured in the attack but are expected to live. It is not clear what the motive behind his attack was.
The incident sparked a massive manhunt, with thousands of troops deployed to block possible escape routes, guard the border between North and South Korea, and protect areas where civilians live, officials said.