A man having a heart attack outside a railway station in northern China survived by throwing money at the problem in a moment of quick thinking on the weekend, according to Chinese media.

The middle-aged man, identified only by his surname Li, keeled over outside the main entrance to the station in Shijiazhuang, Hebei province, on Saturday afternoon, Hebei Youth Daily reported on Monday.

He was rushing to get a ticket to the port city of Qinhuangdao to visit his sick mother when he was hit by extreme chest pain, the report said, adding that Li had had heart stent surgery several months earlier.

Coughing up blood and unable to call for help or take his pills, Li threw a wad of banknotes on the ground to catch the attention of passers-by.