Shocking: This image shows the moment after Ely Hayati was hit by the train, her friend have yet to realise that she is injured

Shocking: This image shows the moment after Ely Hayati was hit by the train, her friend have yet to realise that she is injured
A teenage girl miraculously survived being hit by a train as she posed for a selfie with her friends in Indonesia.

Ely Hayati, 16, had been walking by the railway tracks with her three friends when they decided to pose for a picture and one of them got their selfie stick out.

One photo shows the moment she is struck, and show her friends laughing during the split second before they realise she has been hit.

Her three friends are still smiling, as Ms Hayati lies injured with her skull cracked open behind them, next to the speeding train.

The girls said their friend had been standing behind them, but went flying as a result of a heavy collision.

Moment before: The quartet had been walking by the railway tracks when they decided to pose for a picture, with Ms Hayati seen in a hijab in the back

Moment before: The quartet had been walking by the railway tracks when they decided to pose for a picture, with Ms Hayati seen in a hijab in the back

Injury: Ms Hayati was thrown to the ground by the train and her skull was cracked open

Injury: Ms Hayati was thrown to the ground by the train and her skull was cracked open
Care: Ms Hayati's skull can be seen being sown together in hospital after the incident

Care: Ms Hayati's skull can be seen being sown together in hospital after the incident
It is not known if she was injured by the train hitting her or when she fell onto a stone slab on the track.

The incident took place the city of Purworejo in Indonesia's Central Java Province this week.

Subsequent images show Ms Hayati lying injured on the ground with her gaping wound partially visible under an item of clothing.

She was rushed to a local hospital by the police and pictures show her scalp having been sewn back together.

She will require further medical attention and doctors have yet to report whether she will suffer from any long-term brain damage.

Local authorities did not clarify whether the girls were walking in a restricted area next to the tracks.