It was supposed to be a routine resupply mission: a short drive across the Al Asad Air Base, 90 kilometers north of sweltering Baghdad, to fetch, among other things, a newly-arrived TV to entertain the troops. Jimmy Castellanos, a 20-year-old Marine just five months into his first tour in Iraq, was supposed to be riding on the convoy. But on the afternoon of March 18, 2004 Castellanos, who worked maintaining the weapon systems of the U.S. Army’s Cobra attack helicopters, was told that he was needed for guard duty. His friend and bunkmate took his place.

Jimmy Castellanos in Iraq in 2004.

Around 10 p.m. that night, chased by dust, as if tracing the weakening horizon line between desert and sky, Castellanos watched as the trucks carrying his platoon wended their way home. They were about a kilometer off, but cleanly visible in the desert. When the mortar explosion came, Castellanos wasn’t quite sure what had been hit. A few hours later, news arrived during a casualty briefing: Castellanos’s bunkmate was paralyzed, two other members of the squad had been severely injured, and Cpl. Brownfield, who had sat in Castellanos’s seat, was killed instantly.

The following day the truck was towed back to base, riddled with bullet holes. In the back, the TV, still sleeping in its cardboard box, was now doubly dark brown having soaked up the swill of blood.

When Castellanos returned to America three years later, the effects of the incident began to surface. At night he would check the locks on the windows and doors of his home. He’d go to bed. Then he’d get up to check them again. When he finally fell asleep, he dreamed only of Iraq. When he visited a public bathroom, he would systematically open every stall and look behind every door. Once, someone asked Castellanos about the platoon mate who died that day. Castellanos broke down. “I could not discuss what happened for more than a few seconds without having to leave the room,” he says.

Castellanos, the son of undocumented immigrants who fled El Salvador in 1980 on the eve of civil war, was told endless stories of America’s greatness when he was young. As a teenager, he wanted to give back to the land that gifted his family such opportunity. He joined the military, and after his service, enrolled at Weill Cornell Medical College, in New York, to study a combined MD and PhD in immunology. His tutor, Dr. Olaf Andersen, heard that his student had served in Iraq. When he asked about his experience, Castellanos again broke down in a squall of unsettled grief and anxiety.

Related: Virtual Reality Is Bringing These Lost Worlds Back to Life

For three months, Andersen tried to persuade his student to speak to a psychiatrist. Castellanos resisted. In the military, psychiatrists are considered an enemy. Marines call these doctors “wizards,” not because they had the power to make you better, but because they can make you disappear. “Just requesting to see a chaplain ruined a Marine’s career,” Castellanos says. A single visit to a shrink was enough to ensure you’d lose the respect of your subordinates and any hope of being promoted.

Finally, Castellanos relented. In his first session the psychiatrist wasted no time. “Tell me about your roommate being killed in Iraq,” he asked. Catellanos spent the next ninety minutes in a teary state of bewilderment. “It’s pretty clear to me,” Castellanos recalls the psychiatrist saying, “that you have post traumatic stress disorder. You don’t need medication. You need therapy.”

Living With PTSD

One in three people who experience an extremely traumatic event — anything from a car accident to a natural disaster to a violent mugging — will suffer from PTSD. The symptoms are often persistent and life wrecking: nightmares, insomnia, and feelings of isolation, irritability, and guilt.

“Think about the worst thing that ever happened to you and remember how you felt immediately afterwards,” says Albert “Skip” Rizzo, a research professor at the USC Davis School of Gerontology who has worked with veterans suffering from the condition since the mid-1980s. “Now imagine that six months later, you still feel that exact same thing with the exact same intensity. That’s PTSD.”

The disorder can lie dormant for years, especially if sufferers are otherwise occupied. According to Rizzo, in 2013 approximately 69,000 brand new cases of PTSD were diagnosed in veterans from Afghanistan and Iraq. That same year, 62,000 Vietnam veterans, who more than thirty years earlier had left that chaotic front, were newly diagnosed with the condition. “As people get older and they retire, they’re not as busy,” Rizzo says. “They get more emotionally vulnerable. That can bring it out.”

Treatment for PTSD has varied over the years, from medication to psychotherapy to simple exercise. Most now agree that exposure therapy, a treatment pioneered in the 1950s that seeks to relive a sufferer’s trauma in a controlled, often imaginary environment, is usually the most effective prescription (though many doctors disagree). The idea is to take a patient back to the memory of their trauma over and over again until their triggers no longer produce anxiety. Psychiatrists call this process habituation. Through repetition, the memory is slowly robbed of its power.

Entering a Virtual War Zone

In 1997, researchers from Georgia Tech linked exposure therapy with the emerging technology of virtual reality. Ten volunteers, veterans suffering from PTSD who had not responded to multiple treatments, signed up for the pioneering clinical trial. It was dubbed Virtual Vietnam.

Get the mach newsletter. This site is protected by recaptcha

Dr. DiFede helped develop VR WTC to help burn victims of the 9/11 attacks that were suffering from PTSD. JoAnn Difede, Ph.D. / Hunter Hoffman, Ph.D.

Each pulled on a VR headset — an off-the-shelf eMagin — and was transported to a jungle clearing, or the passenger seat of a Huey helicopter. A therapist then manipulated the sights and sounds in crude ways, while each patient told of their trauma. After a month’s treatment, all ten patients showed significant improvement.

Such was the success of the program that, following the September 11 terrorist attacks on New York’s World Trade Center, one of Rizzo’s collaborators, JoAnn DiFede, began using VR to treat burns victims suffering with PTSD. “People saw the buildings, saw the plane fly into the buildings, heard the sounds and watched the explosion,” she explains. “We did not know if it would work. It did. Better than I ever expected.”

When Castellanos enrolled at Cornell, DiFede, now director of the Program for Anxiety and Traumatic Stress Studies at the university, had expanded her research to look at how the tuberculosis drug D-Cycloserine might be combined with VR to accelerate the treatment’s effectiveness. Working on glutamate receptors in the brain, the drug was shown to enhance learning in rats and mice. DiFede’s idea was that, if patients were given the drug right before the treatment, it would increase the effectiveness of the VR in helping the patient to "relearn."

“We had a 70 percent remission rate within six months,” she says. Perhaps encouraged by the chance to take place in science-advancing research, Castellanos signed up for DiFede’s trials.

"And Then I Was Back in Iraq"

On day one, Castellanos arrived at the hospital, he habitually checked the bathroom’s stalls for bombs or insurgents, and then went to the test area. He was given a model M16 rifle (a weighted replica, colored blue) to hold, and hooked up to machines that monitored his heart rate and eye movements. Finally, Castellanos pulled on the virtual reality headset.

“And then I was back in Iraq,” he recalls. “I was on a convoy. I remember a helicopter flying overhead — a Black Hawk. We saw those daily in Iraq. It was the first time I’d heard one since I came home. My heart was beating. I was sweating. I was holding an M16 rifle and I almost freaked out. It was too much. Then there was an explosion.”

At the time Catellanos was wearing a camel pack, a retrofitted hydration pack that has a compressed air tube fed through it which periodically releases a puff of air to the neck, generating a startle response in the wearer. “I almost lost it completely,” he says.

Inside USC's Bravemind virtual reality, soldiers can sit in any seat of a convoy vehicle to relive their trauma over and over again. USC Institute for Creative Technologies

Inside the headset, the virtual world is crudely rendered, like an aging PlayStation game, all fuzzy textures plastered to blocky 3-D objects. That such an obviously fabricated world can have such an impact on PTSD sufferers seems strange — until you experience it yourself. Virtual Reality fools the human brain by linking the movement of the camera to your head’s movements. Look up and you’ll see the virtual sun wheeling in the virtual sky. Look down and you’ll see the steel-capped toes of your boots. VR creators refer to the mystical effect as "presence." No matter how crude or abstract the virtual world around you, your mind is tricked into believing that you’re there, in mind and body and soul. It’s this trickery that is leveraged by the PTSD treatment.

“We did not know if it would work. It did. Better than I ever expected.”

After he pulled off the headset, Castellanos was given a simple test, associating colors and shapes to the correct labels. “I couldn’t go through it,” he says. “I had completely lost all psychological control. It was absolutely bizarre.” For the next thirteen sessions, Castellanos met with a therapist to go over the story of what he’d seen in 2004 in excruciating detail. While other patients retold their story inside the virtual reality environment, Castellanos was in the control group, using just his imagination.

“I would cry for the entire session,” he says. “I’d get home and couldn’t study. I’d cry myself to sleep. It was exhausting.” Then, slowly, his reaction began to soften. “You go over the story over and over again. I got so bored with my own story that it no longer elicited a reaction.”

Finally, Castellanos returned to the test suite for a final evaluation. His first trip into VR had been so painful that he didn’t recognize he was going through the exact same scene. “It was a completely different experience,” he said. “I don’t remember having the physiological reaction… In 13 weeks I’d completely changed who I had been for the previous ten years. Before the treatment, 80-90 percent of my dreams were Iraq related. Now I can’t remember the last time I had one. I live in a completely different way now.”

“Exposure therapy is an ideal match with VR,” explains Rizzo, who in 2015 received the Pioneer in Medicine Award from the Society for Brain Mapping and Therapeutics. “You can place people in provocative environments and systematically control the stimulus presentation. In some sense it’s the perfect application because we can take evidence-based treatments and use it as a tool to amplify the effect of the treatment.”

Every element of a memory can be recreated in the VR world, from the timing of an explosion to the helicopters flying overhead. USC Institute for Creative Technologies

While more than 50 clinicians around the U.S. are trained to use the VR treatment, the current step in the research is to demonstrate that it is more effective than having patients simply describe their trauma from memory.

“The hypothesis is that we'll show that the VR version will help people to get better faster, because of the sensory element,” Rizzo says. “Remission will be more complete and you’ll be less likely to have a relapse. We should know within a year.”

Erasing the Stigma of PTSD

Weighted replica rifle are used to heighten the reality of the virtual experience. USC Institute for Creative Technologies

VR first emerged in the late 1980s, and then all but disappeared due to the stratospheric cost of components at the time. Its resurgence has been led by the Oculus Rift, a headset designed by a wunderkind VR enthusiast Palmer Luckey, who built its prototype in a garage using mobile phone parts. In 2014 Facebook bought Luckey’s company for $2 billion. Now, as consumer headsets from PlayStation, Google, and HTC flood the market, the costs of these headsets falls and the potential to use VR in PTSD treatments rises.

It is fast becoming one of the most affordable treatments available.

But while PTSD treatment evolves, Castellanos believes that, within the military, the understanding of its effects is still in the dark ages. “In the military PTSD is almost synonymous with weakness,” he says. “Nobody talks about it. Nobody gets evaluated.” The statistics, meanwhile, show PTSD is close to an epidemic. According to official figures, between 11 percent and 20 percent of soldiers who fought in Iraq and Afghanistan between 2001 and 2010 experience PTSD in any given year.

According to the RAND Corporation, almost half of the vets diagnosed with PTSD won’t seek treatment. Castellanos believes there's a systemic failure in the military to warn, address, and treat PTSD sufferers. “If they took a serious approach early in training, when the risks and treatments are ingrained during boot camp, it would change how the military views PTSD,” he says.

Related: How VR Is Redefining Live Music Venues

This is the irony of its stigma, particularly in relation to the military. If properly treated, soldiers with PTSD are able to get back to work much more quickly. “I’m probably the team member who has fared the best,” Castellanos says. “Many of the others can’t maintain jobs, can’t maintain relationships. They are still angry, thirteen years later.”

By maintaining the taboo, the system is weakened. “The end goal,” DiFede says, “is that soldiers can be treated cheaply on the ground using VR. For the most part PTSD sufferers love their jobs and want to get back to them.” She urges soldiers seeking help to contact the Veterans Crisis Hotline.

For Castellanos, while VR offers a technological way to salve the effects of PTSD, it doesn’t factor out the role of the human approach in the equation.

“I always post about my treatment online,” he says. “I talk to veterans. One of the interesting things is that veterans often won’t talk about this stuff unless it’s to another vet. I’ve learned ways to tease out the story. As long as I let them know it happened to me, they completely open up. It quickly turns into a conversation about their symptoms, and their fears about getting help. I hope they do. If they hear it from another Marine, about how it can change lives, I hope they do.”

Follow NBC MACH on Twitter, Facebook, and Instagram.