A Chinese teenager, who said he wanted to test his quickness in dodging a rushing train while sitting on railway tracks, failed in his stunt on Friday. The incident happened at a railway in Fengxian District in Shanghai, China.

The alert train driver stepped on the brakes and managed to stop before the locomotive could hit the fearless teen, according to the Shanghai Daily.

Railway police said the teen, whose surname is Gao and is a native of Chongqing City, was unhurt. The cargo train stopped on its tracks just meters away from where Gao sat on the track.

The train driver and railway police thought the teen was trying to commit suicide because he sat on the rail firmly and ignored the train's siren alarms.

However, Gao told police said he was just curious to see if he could stick to the rails until the last second before jumping off the tracks to avoid the rushing train. He also admitted to not seeing a train before he came to Shanghai in April to work.

Railway police released the teen after warning him of the danger of the stunt.