A Vietnamese soldier shot and killed four people and seriously injured five others before shooting himself dead, state media and witnesses reported Wednesday.

The soldier, identified as Nguyen Manh Hung, 23, reportedly became enraged after being accused of stealing a mobile phone. He grabbed an assault rifle from a locker and began shooting inside an army compound in Hanoi on Monday night, the Tien Phong (Pioneer) newspaper said.

Hung killed three soldiers and a civilian woman, the newspaper said.

"I heard at least two series of gunshots which were several minutes apart," said a resident whose house was next to the walled military compound. "The area was quickly sealed off and local residents were asked to go home," she said, declining to give her name for fear of government reprisal.

A police officer at Hang Bot precinct, where the army unit is located, said he and some other colleagues rushed to the area after hearing the shots.

"When we arrived at the scene, an army colonel stood at the gate and told us to leave saying this is military internal affairs," he said on condition of anonymity because he was not authorized to speak to the media.

City military officials declined to comment Wednesday, but the story was widely publicized in Vietnam's state-run newspapers with military sources quoted.

Murder, or any type of violent crime, is extremely rare in Vietnam where use of arms is strictly prohibited.