A prisoner, who had been declared dead by three doctors, was lying on a slab in the morgue with a physician standing over him ready to perform an autopsy when he let out a snore that saved his life.

Gonzalo Montoya Jiménez was found unconscious in his cell in Asturias prison on Sunday morning. Three doctors pronounced the 29-year-old dead after an examination revealed no signs of life, local newspaper La Voz de Asturias reports.

Jiménez's family was informed that he had died and his body was taken to the mortuary at the Forensic Anatomical Institute of Oviedo. His ‘corpse’ was prepared for an autopsy, including putting incision marks all over his body so the coroner would know where to cut.

READ MORE: Spanish elite soldiers volunteer for 12-week diet after obesity alarm

Luckily the Spaniard let out a life-saving snore just before the cutting commenced and he was quickly transferred to the intensive care unit at the Universal Central Hospital of Asturias.

Telecinco report that it is believed that a case of catalepsy is responsible for the man nearly being killed by the coroner. Catalepsy symptoms include loss of sensation and consciousness, rigidity, unresponsiveness and a slowing of vital bodily functions. The medical condition can be a symptom of epilepsy, from which Jiménez reportedly suffers.

The prisoner's family aren’t happy with the lapse that saw him nearly lose his life. They believe that it is impossible for three doctors to certify his death. Instead they allege that one medic carried out an inspection while the other two merely signed the certificate.

Woman wrongly declared dead in Paris, police discover her still breathing https://t.co/PxcadNePBcpic.twitter.com/DzqkAfgr5v — RT (@RT_com) April 27, 2017

Surprisingly being declared dead is a somewhat regular occurrence. As recently as last April a 49-year-old Parisienne was mistakenly pronounced dead by a doctor following a heart attack.

The woman was saved by two police officers who were shocked when they noticed the woman’s stomach moving and that she still had a pulse.