From the moment Combat Outpost Keating was constructed, it was a death trap.

Located at the base of three steep mountains, in a remote area of Nuristan province, Afghanistan with little strategic value, the soldiers who served there were exposed to enemy fire on an almost daily basis. Hours from the nearest friendly unit, it was only a matter of time before the Taliban made their move to seize the base.

That day came on Oct. 3, 2009, and with it, a phrase no soldier ever expects to hear: “enemy in the wire.” The Taliban had made it inside.

The 12-hour firefight, which came to be known as the Battle of Kamdesh, was one of the bloodiest of the entire war, and pitted 54 American soldiers with Bravo Troop, 3rd Squadron, 61st Cavalry Regiment, against as many as 400 Taliban fighters. The ensuing battle resulted in the deaths of eight U.S. soldiers, with a further 27 wounded, and led to a slew of decorations for valor, including two Medals of Honor, awarded to Staff Sgt. Clint Romesha and then-Spc. Ty Carter. 

Afghanistan War photo

Though the day was ultimately won, and as many as 150 enemy fighters killed, it came at a terrible price.

The events of that battle have been told and retold in news stories and award-winning books, and on July 3, they’ll be shared again, this time on the silver screen. Directed by Rod Lurie, The Outpost is an upcoming war drama based on the best-selling book of the same name by CNN anchor Jake Tapper.

I’ll admit, I went into The Outpost with some skepticism — mainly that the film might end up as little more than two hours of “rah-rah ‘Merica” with lots of heroism, and very little thought devoted to why such extreme acts of valor were even necessary.

Fortunately, those concerns were unfounded, and the few scenes that felt too cinematic for real-life actually did happen, like when Romesha rallies the defenders by telling them “we’re taking this bitch back!” After which he organized and led a daring counterattack to retake the base, for which he received the nation’s highest award for valor.

Perhaps the most compelling part of the film had less to do with its depiction of the final battle, than how it portrayed the men who fought it.

Afghanistan War photo

Take Carter, who is played by Caleb Landry Jones in the film. From the very beginning, he’s cast as having a chip on his shoulder. Older than his peers, and a prior-service Marine, Carter looks down on his fellow soldiers as “frat boys” and seems to actively court their resentment — but that’s precisely what makes him so believable, and compelling.

“I’m not embarrassed of who I was back then, or who I am now,” Carter, who worked on the film as an advisor, told Task & Purpose. “I figure as long as it’s honest then I have nothing to be offended about.”

Coming in the wake of war films like Act of Valor, American Sniper, and The Hurt Locker, it’s refreshing to see a post-9/11 war movie that eschews the depiction of rank and file soldiers as larger than life action heroes beyond reproach.

Afghanistan War photo

By contrast, Romesha (played by Scott Eastwood in the film) is every bit the heroic sergeant, beloved by his men and respected by his superiors. He’s the quintessential infantryman, able to toss in a dash of belligerence in the face of absurd orders from on high, possessing the hard-earned experience to back it up.

The difference between the two portrayals of two recipients of the Medal of Honor speaks to a deeper point: That courage doesn’t solely exist in the hearts of those who look the part, or those you expect it from.

“Soldiers in the military, the unit, they still care about each other, whether they like each other or not,” Carter told Task & Purpose. “Just because I don’t like somebody doesn’t mean I don’t care about them or value their life, and I will respond accordingly because they are my family.”

Related: Ty Carter explains what it’s like to wear the Medal of Honor

During The Outpost’s final battle, Carter is among a group of soldiers pinned inside a Humvee that’s immobilized. Trapped and at the mercy of their attackers, there’s little they can do but hope the vehicle’s armor holds up against the torrent of fire raining down from the mountainside long enough for them to be rescued.

When the soldiers attempt to exit the vehicle in a desperate gambit to make it to cover, Spc. Stephan Lee Mace (played by Chris Born in the film) is grievously wounded. From inside the truck, Carter sees that he’s still alive, just feet away, and calling out for help.

Desperate, Carter convinces Sgt. Brad Larson (played by Henry Hughes), to let him make a run for Mace to bring him back into the Humvee, patch him up, and then make a break for safety with the wounded soldier — an act for which the real-life Carter received the Medal of Honor.

The Outpost likely owes its authenticity as much to Lurie, himself an Army veteran, as it does to the source material, which Tapper based on extensive interviews with soldiers across all ranks who served at Keating, and to its broad cast of support staff, many of whom were military veterans, with some even serving at COP Keating, like Hughes and Carter, who has a cameo, as well as Daniel Rodriguez, who plays himself.

“The whole point of me being there was to assist the military advisers and Rod Lurie to make it as accurate as possible, not only the whole military mechanical part of it, but also the relationships between each other, and how there’s always conflict,” Carter said.

To recreate COP Keating, the production crew selected a quarry in Bulgaria, where its sloping rocky mountainside matched the color and feel of the deadly region they sought to recreate.

“When I first got there, I was, I would say, pleasantly surprised, but it felt extremely awkward,” Carter told Task & Purpose. “I was pleasantly surprised as to how accurate their building of the combat outpost was, but it was very off-putting because it started to bring up a lot of suppressed, or old memories.”

Beyond the technical work, the film needed to take some creative license, Carter said. To make the story fit for the screen it had to be compressed, given that the original book is less an accounting of one unit’s actions, than it is the lifespan of a single base, and of all the men who lived, fought, and died there, such as 1st Lt. Benjamin Keating (played by Orlando Bloom), for which the outpost was named.

During the first half of the film, Keating is killed during a nighttime operation when his vehicle slides off one of the dangerous and winding roads leading to and from the austere base. Though he belonged to the unit that preceded Bravo Troop, in the film the various units that served at that base were merged into one.

Afghanistan War photo

In The Outpost, Keating’s death is directly tied to out of touch military leaders far removed from the troops they command. 

The men are ordered to drive a military cargo truck down the mountain, at night, after the vehicle and its crew barely survives its first trip to the base. And the soldiers risked their lives, one remarks in the film, only because someone with rank on their collar wanted to prove it was possible.

The “top brass” vs. “the men” is a theme that runs throughout The Outpost, and arguably, at outposts, forward operating bases, and encampments across the globe to this day, where the rank and file sometimes feel, and fear, that those guiding the wars they wage are too far removed from the dangers facing those who do the actual fighting.

As the movie draws near to its climactic final act, the men are told their time at the outpost is coming to a close, and before long, the base will be shuttered entirely. 

At the time the final battle takes place, the men at COP Keating should have been on their way home. But political pressures from Washington delayed the order until Afghanistan’s presidential elections were concluded, Carter told Task & Purpose

“After I received the medal, a lot of individuals would ask me ‘what could have been done better, what kind of weapons, what kind of body armor, what kind of equipment, would have saved more lives,’” Carter said. “And then, a friend of mine responded ‘yeah, if we got a tank there that would’ve helped out, but that’s not possible.’ And then I responded ‘the biggest killer of our troops here and overseas is the politicians and agenda.’”

“In other words, some politicians think that troops’ lives are expendable, so that’s why they put us there, and that’s why they left us there.”

The Outpost will be available in select theaters and On Demand July 3.

RELATED: Medal of Honor recipient Clint Romesha on why soldiers go to war