A fourth youth managed to jump to safety before the accident in Panipat city in the northern state of Haryana, a police officer told AFP Wednesday.
"The victims were busy taking selfies and when they saw a train approaching they jumped to a second track without realising another train was coming on that," M. S. Dabas told AFP.
"One of them saved his life as he jumped on the other side of the track." The group had come to Panipat to attend a wedding. Two of those killed were 19-years old and the third was 18.
Experts warn that youngsters obsessed with social media are going to extreme lengths in order to post selfies seen as daring and risky.