Like Kimberly Peirce’s Stop-Loss, A Marine Story casts a highly critical eye over the US Military’s treatment of its own personnel during the Iraq War. Peirce’s film was about the practice of shipping soldiers back to Iraq against their will — forcing many to live as fugitives. Here the equally controversial “Don’t ask don’t tell” policy has the perverse effect of kicking a decorated officer out of the Marines on the grounds of her sexuality. Well, no one ever said war was fair.

Writer/director Ned Farr’s film stars his wife Dreya Weber as Major Alexandra Everett, who returns to her home town in California in the summer of 2008. Despite her long blonde hair, Alex has the tattoo, the muscle tone and the steely look of a woman who means business. There’s also a wedding ring, an empty house and a husband no one seems to have met. It’s not long before she’s tangling with a meth addict who’s about to rob a convenience store – leading to an awkward chat with the local sheriff. After 19 years’ service, civilian life is going to be equally tough.

At the sheriff’s request, Alex agrees to give a pep talk to a young woman with a history of trouble, who’s now faced with boot camp or jail. As Saffron (Paris Pickard) reluctantly submits to a gruelling training regime, the older woman bombards her with stock messages about the mindset that is required for a career in the armed forces. All this talk about conforming is cruelly ironic, given that Alex has been rejected as a result of her failure to do just that. But there are some “attitudes” that you just can’t unlearn, no matter how hard you try.

A Marine Story could have trodden familiar “Movie of the Week” territory, with another plucky gay martyr battling the heterosexual establishment and familial prejudice. But unlike Glenn Close’s Margarethe Cammermeyer in Serving in Silence, Alex doesn’t mount a legal battle and there are no crusading lawyers or journalists here to take up her cause. Though her family boasts a proud military heritage, Alex is very much a loner, defiantly surveying the world from her hill-top home beneath the shadow of the Stars and Stripes.

Farr’s screenplay does end up addressing homophobia, but it begins by taking a route familiar from many westerns – the returning resident who falls foul of the hostile townsfolk. Refusing to rely on clichés or grandstanding performances, A Marine Story allows Alex’s story to emerge gradually, both through her mentoring of Saffron and her awkward relationships with some of the locals. The conflicts here are as much about old-fashioned misogyny and criminality as gay-bashing — though the results are no less shocking.

We get it: she’s R Lee Ermey in a B-cup.

The tone is set early on with a convincingly staged bar-room brawl, triggered when Alex beats a couple of men in a bout of arm-wrestling. Those who’ve voiced scepticism about the effectiveness of women in combat are in for a rude awakening. Once she’s attacked, Alex lays into her tormentors with the ruthless efficiency of someone who does this for a living. What follows is a long way from the usual titillating scenes of leather-suited female superheroes kicking butt. Weber, who also starred in Farr’s The Gymnast, has the sheer physicality to put the boys in her place. It’s thrilling to watch. Then she hitches up her torn T-shirt and drives off into the night.

Like a female Clint Eastwood, Weber’s Alex favours action over procrastination or heartfelt speeches. Self-pity and tears aren’t her stock in trade: “Marines don’t cry; their eyeballs sweat” is the mantra she lives by. Perhaps there is a little too much emphasis though on close-ups of her bulging biceps, tight abs and a face obscured by those ever-present shades. We get it: she’s R Lee Ermey in a B-cup.

But Weber’s performance is about more than just stoicism in the face of physical threat. Her vulnerability is finally revealed during scenes with old friends Holly (Christine Mourad) and Leo (Anthony Michael Jones). There’s obviously been an ebb and flow of attraction between all three that dates back to their school days. But a drunken kiss between the two women doesn’t end the way you might expect.

For me the weakest scenes in the film are the flashbacks in which commanding officer Lt Col Pollard (Jeff Sugarman) tells Alex that she’s under investigation for “conduct unbecoming an officer”. The moment when realises she’s been “outed” by some four-year-old photos felt rather flat. But this is not a film about a woman being forced to choose between her career and a current lesbian relationship. The message here is that being good at your job and following the rules — celibacy, a sham marriage and a lifetime of lying – still isn’t enough.

A Marine Story has its flaws: Craig Richey’s score is a bit overpowering at times and the romantic element of the plot seemed a little contrived. But in a film notable for fine low-key performances and emotional honesty, Weber is outstanding as a woman bravely coming to terms with the end of her career. If anyone embodies the Corps motto “semper fidelis”, she does.

Given the subject matter, A Marine Story could have ended up as a very bitter, preachy and humourless film. (Those qualities are all to be found in abundance in Ken Loach’s heavy-handed Route Irish.) But though both deal with the fall-out from the Iraq war and culminate in an explosion, they couldn’t be more different. “Don’t ask don’t tell” may be on its way out, but I fear the war against intolerance is far from over.