Indian Railways RTR48NKM
Ahmedabad, India Workers clean a railway track at a railway station in the western Indian city of Ahmedabad October 2, 2014. Reuters/Amit Dave

A video showing a man taking a selfie next to the railway tracks and getting hit by the train went viral this week.

The Government Railway Police in India released the video of 25-year-old student R Shiva Kumar getting injured while taking the selfie, according to the Indian Express.

The clip shows Kumar standing next to the railway tracks with his back to the train as it approaches. The conductor warned Kumar about the train’s proximity by honking repeatedly. Kumar's friends were also recording videos on their smartphones and warned him to step away from the tracks. Kumar ignored the warnings and continued to take the video. Warning: The clip below shows the man getting hit by the train.

The incident reportedly happened on Sunday afternoon local time near the Borabanda Railway Station in Hyderabad, India. Officials said Kumar was seriously injured.

“He did not realize the danger he was in and ignored the furious honking by the loco pilot who tried to warn him off,” Dasya Naik from the Nampally/Telangana State Railway Police said, according to the Indian Express. “The train hit him and he was thrown away from the track. He received serious injuries on right hand, head and chest, but is out of danger now.”

The video of the train hitting the Kumar had thousands of views on YouTube as of Wednesday afternoon eastern time. The clip also went viral on Twitter and Facebook.

Before the incident, another video also showing a young man on the tracks had also gone viral. That clip shows the individual lying on a railway tracks as a train runs over him. He is then seen celebrating the act with friends after the train passes.