The rifleman committed suicide by shooting himself, said senior official. (Representational)

An army officer was shot dead on Tuesday at Pallavaram barrack by a rifleman, who later killed himself for allegedly being punished for "lethargic attitude in duty", police said.

A senior official said the incident took place at around 3 AM on Tuesday.

The rifleman committed suicide by shooting himself, he said.

"We suspect that the rifleman was emotionally worked up after the Havildar punished him for his lethargic attitude in duty," the officer told PTI.

Defence sources said the matter was under investigation.