File picture: Pixabay

Berlin - It's every parent's worst nightmare: A stranger grabbed a child from his family's clutches and jumped into the path of an incoming train in the German city of Wuppertal.

The 5-year-old boy escaped the incident with minor injuries, a police spokesman said on Friday. After running towards the train on Thursday evening, the 23-year-old lay down on the tracks along with the boy.

The train's driver had spotted the unfolding drama and applied the emergency brakes, though it was too late to bring the machine to a halt. The train rolled over the duo but didn't make contact with either of them.

The 23-year-old, who also escaped largely unscathed, was arrested at the scene. He was found by a psychiatrist to be suffering from schizophrenic psychosis. He has been placed under supervision, it emerged on Friday.

Police are now investigating the incident as a case of attempted murder.