Gonzalo Montoya Jimenez, who was serving time at a jail in Asturias, regained consciousness just hours before he was to be cut up for an autopsy.
His family said he had been marked up by doctors for the post-mortem examination.
The prisoner is now in intensive care at an Oviedo hospital and is under strict observation.
Doctors believe the strange case could be a result of catalepsy – a condition where a person’s vital signs slow down to the point of being almost imperceptible.
His ‘death’ had been certified by three experienced doctors at the prison, who ordered his body to be sent to the mortuary for further examination.
The body was taken to the Institute of Legal Medicine in Oviedo, the regional capital.