A selfie stunt gone wrong has claimed the life of a teenager in India. The 15-year-old boy was electrocuted to death after he climbed on top of a train to click a selfie.

The victim, identified as Ganeshwar, climbed atop a goods train engine that was parked in a railway station in the southern Indian state of Tamil Nadu, in an attempt to click a selfie.

While taking a photo of himself, the boy accidentally touched a high tension wire that was running above the train. He was electrocuted and died on the spot, local daily Hindustan Times reported.

Investigation revealed that the boy's father was a quality inspector who would visit the railway station regularly to inspect food grains transported by goods trains. On the day of the incident, the teen, a grade nine student, had accompanied his father to the railway station. He climbed on the locomotive when his father was on a different platform inspecting the grains.

"His father, who is a Junior Quality Inspector, had brought his son along as he had inspection work at the railway station," a police officer told local channel NDTV.

The boy's body was sent for an autopsy and further investigation was ongoing.

The incident comes months after two students from Philadelphia's Temple University fell from a rooftop party while attempting to take a selfie. The students, both 19 years old, were drinking at the party when they fell four stories from the roof while trying to take a selfie.

Both the students, whose names were not identified, suffered multiple injuries. Following the incident, other students said the rooftop deck where the party took place was not safe.

"There's not enough room blocking you from falling off, so if you're drinking and you run right into it, it’s really easy to slip right off because it only comes to like a little halfway between your knee and hip," a student had said.

train track in india
Representational image of a railway station in India. AFP / DIPTENDU DUTTA