A cascade of reactions in your brain and body kicks in the moment you walk through a jail's door. It’s not fun.

So you’ve committed a crime. Or maybe you are just accused of one. Either way, you’re suddenly behind bars.

It’s not your imagination: Your body is not happy about it. Science backs that up.

“When the body enters that kind of situation, it does some pretty reliable things,” says Dr. Jaime Blandino, a consultant to the third season of “60 Days In.”

“You get flooded with adrenaline and stress hormones, like cortisol, and chemicals that kick off a flight–or–fight response, your body's natural way of dealing with an emergency situation or a uniquely stressful situation,” she says.

WATCH: Binge episodes of 60 Days In, no sign in required.

Here’s what you can expect from your body when you go behind bars for the first time:

Uh–Oh: Noise, Smells, Lights Set Off the Alarms

As the soon–to–be inmate enters the jail — that’s you in this story — he or she first sees and hears what’s going on around him or her. Your senses will drink in many new inputs, maybe some that are totally new and definitely some that are scary.

That information will get sent to the amygdala, the part of the brain that processes emotions. It will interpret the information: picture rowdy inmates acting up as they go through intake and loud, annoyed correctional officers. Either or all can seem pretty menacing. It probably doesn’t smell great in there either.

Yikes.

The amygdala sends a distress signal to your brain’s hypothalamus — essentially the brain’s command center — and communicates with the body through the autonomic nervous system, which controls his heartbeat, breathing, and digestion. Yep, that’s why your heart is racing.

The sympathetic nervous system is activated by the hypothalamus after it receives that distress signal from the amygdala. It then sends a signal to the adrenal medulla part of the adrenal glands, located above the kidneys, to start producing the adrenaline (also known as epinephrine) and norepinephrine. These hormones both pump the body up and will help get our inmate ready to fight any perceived threats — or get out of the way. That’s fight or flight.

Unfortunately, you have nowhere to fly to. And fighting isn’t allowed.

(It’s important to understand this set of reactions is typical for a person not dealing with any special circumstances. For someone with mental issues or substance abuse problems, their brain chemistry may be different.)

The Rise of the Stress Hormones

Your body may be pretty unhappy about now. But things are just getting started.

The hypothalamus sends a signal to the pituitary gland in the brain to secrete adrenocorticotropic hormone. This hormone stimulates the adrenal glades to produce corticosteroid, including cortisol, “the stress hormone.”

The adrenaline/epinephrine and norepinephrine circulates through the inmate’s body and causes a number of physiological changes.

Your blood pressure and respiratory rate increase and your senses become heightened. Although epinephrine and norepinephrine are similar, they also balance each other (the norepinephrine will be responsible for decreasing your heart and respiratory rate later, essentially calming you down a bit). The corticosteroids also circulate and help supply your body with stored glucose from the liver for energy, so you probably won’t be hungry as your brain and body is going through this acute stress response.

Other hormones are released as well including estrogen, testosterone, and the neurotransmitters dopamine and serotonin.

All of these stress hormones rise about 20 to 30 percent above the brain’s baseline for those individuals who are entering jail without a chemical or hormonal balance in the brain to begin with, says Dr. Barbara Kirwin, a forensic psychologist who provides psychotherapy to felony offenders and a professor of forensic science at Adelphi University.

You Must Find a Way to Survive

After intake, the prison stay unfolds. Obviously, the experience varies greatly from person to person.

Do you lay low and not have any issues with other inmates? Or are your stress hormones on overload, sending you into a fight, which only results in further stressful punishment?

All of these factors will determine when stress hormones recede to near baseline, at least for some of the time in jail.

After the initial flood of stress hormones, we do know at least one part of the brain is seriously affected after the initial rush. Blandino says the cerebral cortex, the part of the brain that is more sophisticated and helps in problem solving, starts shutting down. “It is part of the reason you see so many people in jail reverting to primitive kinds of behaviors and ways of relating,” she says.

“They don’t have a choice but to simply function and figure out a way to survive. Like animals do, we try to find a tribe. We try to find connections with people, allies, people who have your back, people who are like you or have a similar background. [But] you’re still always vigilant. You still have to adapt to this higher–than–normal level of cortisol and testosterone.”

Kirwin says the flood of stress hormones in inmates will also make them become hyper–sensitive to their surroundings because they are protecting themselves. “When you’re in a smaller group situation that tends to create irritability and hostility,” she says. “You don’t become buddies [with your cellmates]. There’s more fighting and it’s almost a primitive competition for space [or] for the use of bathroom facilities.”

Worse–Case Scenario: Solitary Confinement

While some inmates may actually thrive with higher–than–normal stress hormones, many of them will suffer more adverse effects. They can have panic attacks and difficulty thinking, concentrating, or remembering things. They can even have paranoid or obsessive thoughts or hallucinations.

“They have changes in their sleep cycles which then exacerbates the rest of the brain chemistry,” says Kirwin.

These symptoms get even worse if the person is forced to spend time in solitary confinement, when hallucinating is common due to the lack of stimulation. Some studies have pointed to likelihood of brain damage from prolonged exposure to the stress hormones, says Kirwin.

One 2006 study, conducted by Dr. Stuart Grassian of Harvard University Medical School, “The Psychiatric Effects of Solitary Confinement,” found that inmates at Bay State Prison in California’s Security Housing Unit (SHU) experienced anxiety, paranoia, suicidal–thoughts, and psychotic symptoms as a result of their prolonged solitary confinement. He would later coin the term “SHU Syndrome” to describe these symptoms as they apply to inmates.

Freedom, But With a Price?

So what happens to your brain chemistry once you’re released from jail and you’re a free person again?

The short answer is that we really can’t say for sure. There are so many variations on the kinds of people who go to jail, that it’s almost impossible to say what would be next for a first–timer.

Kirwin says there’s “no way” to estimate how long it would take for an inmate’s elevated stress hormones to go back to baseline post-release. It’s idiosyncratic,” she says. “At this time we have no way of measuring it.”

“There are a lot of people who are in the neuroscience of criminality field who would say if inmates had optimal brain chemistry they would not be committing crimes,” she added.

Kirwin does acknowledge that some people will be “lucky,” while others may be “extremely unlucky.” “Even the lucky ones are going to have some kind of stress problem,” she says.

The longer your stress hormones are elevated, the more psychological damage may occur, says Blandino. Elevated stress hormones can present a real risk for Post-Traumatic Stress Disorder (PTSD) or depression.

“They have to literally re–learn how to be a functioning human being without that rush of cortisol, without that fight–or–flight activation,” she says. “The nervous system is not as smart as the frontal lobe [which controls our personality and ability to communicate].”

Kirwin says the brain may actually see structural changes, with stress killing neurons in the cortex.

Length of stay, type of facility, age, previous head injuries, substance abuse and other factors can all contribute to an inmate’s vulnerability, Kirwin says.

“What we see is how fragile the brain is, how fragile the cortex is,” says Kirwin. “We didn’t know that before. We thought [to see the level of damage] you had to hit somebody over the head. Now we’re seeing that you don’t even have to land a blow physically to create terrible changes in the brain.”

Counseling, support systems and proper medical care can become crucial to helping these inmates re–adjust to society, doctors agree.