As night fell in the horror film 28 Days Later, I assumed my standard horror-movie fetal position: knees to chest, eyes closed, heart pounding. Then the zombies broke through the window.

As I plucked popcorn from my hair and my pulse slowed slightly, I promised to never, ever watch such a scary movie again. But this summer 28 Weeks Later hit the theaters. My friends told me it was even scarier. Of course I couldn't resist. And that night, as I tried to fall asleep with the windows locked and the lights on and the TV blaring, I wondered ... why do I do this to myself?

If the half-billion dollars spent by Americans on horror movies last year is anything to go by, I'm not the only one to ask that question. Scientists believe the answer is that humans have evolved to enjoy fear.

"There's a substantial overlap between those brain areas involved in processing fear and pleasure," said Allan Kalueff, a neuroscientist at the University of Tampere in Finland.

As Halloween approaches, the latest research into fear suggests that the neurological systems in our brains that are stimulated by fear are the same as those associated with pleasure. So while you're watching Saw IV or playing Resident Evil, you get the gratification of real fear without any of the danger.

Scientists say that while watching a scary movie, or playing popular games like Bioshock and Dementium, information runs from your eyes and ears to an almond-shaped clump of neurons called the amygdala. Located front-and-center in your brain, the amygdala has long been understood as vital to instantaneous emotional processing, especially of love and pleasure.

Experiments on rats have also shown that damaging their amygdalae interferes with their capacity to feel fear, suggesting an overlap between such seemingly opposite emotions as pleasure and fright.

So as the zombie breaks through the door or the murderer leaps from the closet, your amygdala gets juiced just as it would by a home run in the bottom of the ninth, unleashing a brain- and body-energizing cocktail of hormones. But while this is happening, information also travels to your prefrontal cortex, the part of the brain responsible for consciously evaluating danger. It tells you that the movie is just a movie.

Remove that part of the equation, and you likely wouldn't remember 28 Weeks Later any more fondly than the time you thought you were being followed down a dark alley.

"The amygdala gets just as activated by fear as it would in the real world, but because your cortex knows you're not in danger, that spillover is rewarding and not frightening," said Yerkes National Primate Research Center neuroscientist Kerry Ressler.

Like the amygdala, the nucleus accumbens also processes both pleasure and fear. It is a collection of neurons located just behind your forehead. Its dual role may explain why deep-brain stimulation, an electrical therapy used to treat psychiatric disorders and Parkinson's disease, sometimes causes feelings of panic.

Why would our brains work this way? It seems it would make more sense to separate the two forms of stimulation. But Kalueff thinks the arrangement is genius.

"If arousal is only pleasant or only unpleasant, that doesn't make sense. Situations change all the time. What's pleasant now could be unpleasant tomorrow," he said. "It's up to the brain to decide, to the individual to decide, whether it's danger or pleasure."

It's also possible, however, that it's just an evolutionary quirk, a bit of crossed wiring produced by fitting a mind more powerful than any supercomputer into a melon-sized chassis. Scientists aren't sure, nor can they explain, why one person falls asleep easily after watching The Silence of the Lambs while another lies in bed for hours, eyes open and lights on.

Scientists also admit that the focus on basic neurobiology doesn't explain other aspects of pleasurable fear. As Ressler noted, experiencing fear and coming out unscathed is itself satisfying � an observation that stems more from psychology than neuroscience.

Psychologists say that watching scary movies is a way of testing and overcoming our limitations, similar to bungee jumping and other extreme sports.

"That could be why scary movies and games are so popular with children. They're at a point in their lives when they're testing their boundaries," said Kansas State University psychologist Leon Rappoport. "By the time they get to college age or later, they've had enough of them. Their development proceeds in more substantial directions."

But plenty of adults enjoy scary movies. For them, the horror films may be a form of therapy, a way of dealing with ambient fear in a society where war and disaster and crime are broadcast around the clock, and the contents of an aerosol can may cause cancer.

"It is gratifying to confront and overcome a fear," said Rappoport. "Many therapies are exposure therapies. It allows the individual to gain a sense of mastery over their anxieties, whatever they may be."