A study has revealed what could happen in the final moments before death.
Research from a scientific 'accident' has indicated that the suggestion that life 'flashes before our eyes' before death could actually have some truth to it.
The data was discovered when a team of scientists measured the brainwaves of an 87-year-old man who had developed epilepsy.
However, the patient sadly suffered a fatal heart attack while the team were conducting a neurological reading, which revealed an unexpected insight into what can happen when a person dies.
The recording - which is the first ever recording of a dying brain - indicated that in the 30 seconds before and after death, brainwaves followed patterns similar to dreaming or recalling memories.
Scientists think the findings could suggest a 'flashback' before the end of life.
Dr Ajmal Zemmar, co-author of the study - which was published in Frontiers in Aging Neuroscience - told the BBC: "This was actually totally by chance, we did not plan to do this experiment or record these signals," he said.
"If I were to jump to the philosophical realm, I would speculate that if the brain did a flashback, it would probably like to remind you of good things, rather than the bad things."
"But what's memorable would be different for every person."
Dr Zemmar added that the activity continued for 30 seconds after the patient's heart stopped beating.
"This could possibly be a last recall of memories that we've experienced in life, and they replay through our brain in the last seconds before we die," he said.
The study also raises questions about the point of death and whether it occurs when the heart stop beating, or when the brain activity ends.
Dr Zemmar explained that more studies would need to be conducted, adding that conclusions cannot be drawn from just one.
"I never felt comfortable to report one case," he said.
However, one study from 2013 also offered interesting findings. In the study, US scientists looked at brainwave activity in healthy rats at the point of death, until 30 seconds after death.
Dr Zemmar described the similarities between his study and the research conducted in 2013 as 'astonishing'.
"I think there's something mystical and spiritual about this whole near-death experience," he said.
"And findings like this - it's a moment that scientists lives for."