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.

Google’s software can predict whether you’re at risk of a heart attack by looking at your eyes

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.

Why heart attacks are leading cause of death in women, and why many women are unaware of the higher risks they face

His plan worked – a police officer on patrol spotted him and came over to offer help.

“I initially thought he was probably drunk. It was only after I walked closer that I realised that things were more serious than that,” police officer Lin Xiangshen was quoted as saying.

Lin said Li had been rummaging in his backpack before he fell and was holding a bottle of pills.

He said he summoned medical staff and helped the man take the medication.

Li recovered gradually and medical staff let him go after doing a check-up and ensuring that his blood pressure had returned to normal.

For the latest news from the South China Morning Post download our mobile app. Copyright 2018.