Dead body
Representational ImageCreative Commons

A 29-year-old prisoner in northern Spain woke up in a hospital mortuary after being declared dead by three doctors just a few hours ago.

Gonzalo Montoya, who was convicted of theft of junk, regained consciousness just hours before an autopsy was due to be performed.

He was certified dead on Sunday in a prison cell at the Penitentiary Center of Asturias where he is serving his sentence in Asturias, northwest Spain, reports claim.

ALSO READ: 'Dead' man starts breathing during funeral

The 'corpse' was put in a body bag after three medics claimed that he is dead after not noticing any signs of life. However, after he was sent to the Legal Medicine Institute of Oviedo, the forensic doctors heard some noises and realised that he was alive.

Local news sites reportedly claimed that the 'dead man' started snoring on the autopsy table and it was what saved him.

According to the family who was called to visit him for one last time said that he had autopsy markings on him, ready to be opened up.

After he regained consciousness, he was then moved to the Central University Hospital of Asturias in Oviedo.

According to a mirror.co.uk report, sources believe that it was a case of catalepsy -- a medical condition characterised by a loss of sensation and consciousness and is in a stable condition now.

ALSO READ: Man returns home seven months after family 'cremated' his body

A spokesman for the Spanish Prison Service said: "Two prison doctors concluded he had clinical signs of death following a morning roll call and informed police, his next-of-kin and a local duty court as part of standard procedure."

"The court sent a forensic doctor who was the one who actually confirmed his death. I can't comment on what happened at the Institute of Legal Medicine but three doctors have seen clinical signs of death so it's still not clear at the moment exactly why this occurred," the spokesman added.