Three teenagers lost their lives after being struck by a train moments after taking a selfie while positioned on railway tracks.

The trio took a photograph between two sets of railroad tracks before two were killed instantly, with the third succumbing to her injuries several days later.

Essa Ricker and Kelsea Webster, both 15, along with Kelsea's 13-year-old sister, Savannah, were taking in the fall foliage and pleasant weather in the picturesque canyon near Covered Bridge, in the US state of Utah, in October 2011.

The three were walking between two parallel sets of railroad tracks running alongside each other when they spotted a westbound train approaching, reports the Daily Star.

USA, Utah, goods train

Excited, the girls set up to photograph themselves with the train, coordinating the timing to capture a selfie of all three looking happy as the breeze from the passing train swept through their hair.

Savannah quickly shared on her Facebook page: "Standing right by a train ahaha this is awesome!!!!" While they were caught up in the moment, the noise from the departing train masked the sound of an approaching eastbound train.

Train conductor John Anderson later recounted seeing the girls for approximately 12 seconds as the engineer sounded the horn and engaged the emergency brakes, noting they were entirely focused on their photo and oblivious to the approaching danger.

"They were in their own little world," he subsequently told the Union Pacific's news website. "We watched in horror as we got closer. We saw them for about 12 seconds until they disappeared from our sight, and the train continued moving forward."

Facebook post

The train struck the girls, with Essa and Kelsea killed instantly.

When the train eventually came to a halt, roughly a quarter mile down the track, John rushed back to check on the trio, discovering Savannah still alive. "I told her everything would be OK, and she relaxed a little," said John.

"I hoped she would make it, and for some reason I really thought she would."

Engineer Michael Anderson, who was with John on the train, said: "What happened was very intense, and I have to carry it the rest of my life. I don't know what John saw that night, and I don't want to know what he saw that night."

Savannah was taken to a medical center in Salt Lake City in extremely critical condition, but after three days in intensive care, doctors told her parents that the trauma to her brain was too severe for her to recover. Days following the tragedy, Jayna Webster, mother to Kelsea and Savannah, released a statement.

"Even though the doctors have done everything possible, Savannah will not be able to recover. It is time to say goodbye, for now, to an angel that walked among us," she expressed.

"The amount of love that has been sent our way has been overwhelming. It has kept our spirits up and brought us a peace that you may not even understand," she continued.