In the 2017 movie "Flatliners," Courtney (Ellen Page) experiences death. But then she gets better.

Driven by ambition and curiosity to learn what lies on the other side of death, five medical students deliberately stop their hearts in order to experience "the afterlife" in the new thriller "Flatliners" (Sony Pictures), which opened in U.S. theaters on Sept. 29.

They quickly discover that there are unexpected and terrible consequences of dallying with death — but not everything they experience after "dying" is in the realm of science fiction. A growing body of research is charting the processes that occur after death, suggesting that human consciousness doesn't immediately wink out after the heart stops, experts say.

But what really happens in the body and brain in the moments after cardiac arrest? [The Science of Death: 10 Tales from the Crypt & Beyond]

The terms "cardiac arrest" and "heart attack" are frequently used interchangeably, but they are not identical conditions, according to the American Heart Association (AHA). During a heart attack, a blocked artery prevents blood from reaching a portion of the heart, which can cause that section to die — though the heart continues to beat, the AHA explained.

During cardiac arrest, the electrical signals driving the heart's pumping action are disrupted, the heart ceases beating and death shortly follows, the AHA said.

In the vast majority of terminal cases, physicians medically define death based on when the heart no longer beats, said Dr. Sam Parnia, director of critical care and resuscitation research at NYU Langone School of Medicine in New York City.

"Technically speaking, that's how you get the time of death — it's all based on the moment when the heart stops," he told Live Science.

Once that happens, blood no longer circulates to the brain, which means brain function halts "almost instantaneously," Parnia said. "You lose all your brain stem reflexes — your gag reflex, your pupil reflex, all that is gone."

A trajectory of cell death

The brain's cerebral cortex — the so-called "thinking part" of the brain — also slows down instantly, and flatlines, meaning that no brainwaves are visible on an electric monitor, within 2 to 20 seconds. This initiates a chain reaction of cellular processes that eventually result in the death of brain cells, but that can take hours after the heart has stopped, Parnia said.

Performing cardiopulmonary resuscitation (CPR) does send some blood to the brain — about 15 percent of what it requires to function normally, according to Parnia. This is enough to slow the brain cells' death trajectory, but it isn't enough to kick-start the brain into working again, which is why reflexes don't resume during CPR, he said.

"If you manage to restart the heart, which is what CPR attempts to do, you'll gradually start to get the brain functioning again. The longer you're doing CPR, those brain cell death pathways are still happening — they're just happening at a slightly slower rate," he told Live Science.

Recent studies have shown that animals experience a surge in brain activity in the minutes after death. And people in the first phase of death may still experience some form of consciousness, Parnia said. Substantial anecdotal evidence reveals that people whose hearts stopped and then restarted were able to describe accurate, verified accounts of what was going on around them, he added.

"They'll describe watching doctors and nurses working; they'll describe having awareness of full conversations, of visual things that were going on, that would otherwise not be known to them," he explained. According to Parnia, these recollections were then verified by medical and nursing staff who were present at the time and were stunned to hear that their patients, who were technically dead, could remember all those details. [Heart of the Matter: 7 Things to Know About Your Ticker]

Death and beyond

Parnia and his colleagues are currently investigating the pervasiveness of consciousness after death. They're looking at large numbers of people in Europe and the United States who have suffered cardiac arrest, in the largest study of its kind, he said.

"In the same way that a group of researchers might be studying the qualitative nature of the human experience of 'love,' for instance, we're trying to understand the exact features that people experience when they go through death, because we understand that this is going to reflect the universal experience we're all going to have when we die," he said.

The study researchers are also observing the brain in detail during the period of cardiac arrest, death and revival to understand how much oxygen is reaching the brain, when exactly the cortex comes "back online" and how these experiences relate to brain activity itself, Parnia added.

For these scientists, the most important next steps are finding more accurate methods of monitoring the brain from beyond the threshold of death and improving the quality of resuscitation, to do a better job of preventing brain injuries while restarting the heart, Parnia said.

"At the same time, we also study the human mind and consciousness in the context of death, to understand whether consciousness becomes annihilated or whether it continues after you've died for some period of time — and how that relates to what's happening inside the brain in real time," Parnia said.

"Flatliners" characters discover that consciousness can persist after death. (Image credit: Sony Pictures)

The "Flatliners" movie also suggests that death and resuscitation could enhance normal brain activity after revival, as the students who "died" and woke up can suddenly remember obscure passages in long-forgotten books. However, in the real world, a return ticket from death doesn't include newly acquired cerebral superpowers — though it does frequently provide a new perspective on life, Parnia noted.

"What tends to happen is that people who've had these very profound experiences may come back positively transformed — they become more altruistic, more engaged with helping others. They find a new meaning to life having had an encounter with death," Parnia said.

"But there isn't like a sudden magical enhancement of their memories," he added. "That's just Hollywood jazz."

Original article on Live Science.