The last good movie about the war in Afghanistan was 2014’s “American Sniper,” starring Bradley Cooper. It made more than half a billion at the box office. Guy Ritchie hopes his new war movie, “The Covenant,” will do the same.

But “The Covenant” is about more than just American soldiers fighting the Taliban. Ritchie wants to make a point about a broken promise, the agreement our government and military made to help Afghans who served with US forces as translators. Doing so put their lives and families in mortal danger, for which they were to be rewarded with special visas that would allow them to move to America.

A covenant also means a bond, like the one between Ahmed (Dar Salim), a former heroin dealer embedded with a squad run by Sgt. John Kinley (Jake Gyllenhaal). He goes out with them on missions, translating Arabic to English and vice versa as well as providing intel about the area they’re scouring for bomb manufacturers. When things go wrong during a raid of one such suspected facility, Ahmed and John barely manage to escape and find themselves stranded deep in Taliban-controlled territory. When John is wounded, Ahmed does everything in his powers to keep him alive and transport them both back to their base, more than a hundred miles away. In return, John takes it upon himself to get those visas for Ahmed and his family, an undertaking that frames the second half of the movie.

Watching Gyllenhaal’s work in “The Covenant,” I thought about how differently he plays the role than he did a decade ago as a mousy, greasy videographer in “Nightcrawler.” Here, he’s a macho warrior on his fourth tour in Afghanistan, fighting for his life. War movies tend to be shot wide and long, but Ritchie frames the action so close to the combatants I felt drawn in as a viewer.

Salim is terrific as Ahmed first forms a tentative connection with John, then rises to the occasion to protect them both in situations fraught with danger. Antony Starr (Homelander in the Prime Video series “The Boys”) is good as a special forces operative John engages along the way, while Jonny Lee Miller and a supporting cast of tough-looking guys play the other somewhat cliched men in uniform. Emily Beecham gets the thankless task of playing a warrior’s wife back home.

As director and co-writer, Ritchie has chosen to place his name in the official title of the movie, making it “Guy Ritchie’s The Covenant.” That’s an ego stroke you don’t see Spielberg or Scorsese taking, but the distinction will only matter when you search for it in the listings. The result of his efforts is a solid war movie with a message that resonated with me, particularly at the end when we learn how many Afghans were promised a way out of their homeland yet still haven’t been evacuated.

I give “Guy Ritchie’s The Covenant” a 7.5 out of 10. Opens in theaters today.