Sicario, the new film by the French Canadian director Denis Villeneuve, is in effect two separate movies. One is terrific and one quite good, but the two coexist in uneasy tension.

The first movie-within-the-movie, which takes up two thirds or so of the overall running time, is essentially a war film involving two nations—the United States and Mexico—that are not technically at war. On one side is the Sonora drug cartel; on the other, a variety of elusively defined covert U.S. agencies and one moderately bewildered FBI agent.

The film opens with a bravura sequence, as that FBI agent, Kate Mercer (Emily Blunt), and members of her heavily armed kidnap-response team converge on an unprepossessing house in the Phoenix suburb of Chandler, Arizona. The team makes its entrance by bursting into the living room. In a tank. Once the gunfire subsides, it turns out that there are no kidnappees on the premises to rescue. But stashed within the walls of the house are dozens of decomposing corpses that loom like hellish apparitions, quasi-mummified and with plastic bags cinched tight over their heads.

A special task force is charged with dealing with the root sources of what the television news is calling the “House of Horrors.” And owing to her reputation as a “thumper,” someone who’s “been kicking in doors since day one,” Kate is invited to join on behalf of the FBI. The head of the task force is Matt Graver (Josh Brolin), who is vaguely described to Kate as a “DoD consultant.” He is irreverent enough to attend high-level meetings in a T-shirt and flip-flops, and important enough to have no one mention it.

The task force’s objectives are obscure: Matt describes them initially as “to dramatically overreact” and later, “to stir the pot.” To begin with, they involve taking a heavily armed contingent across the border to Juárez to pull a cartel man out of a Mexican prison and bring him back the States. What follows is a sequence of stunning cinematic virtuosity and the most thrilling exercise in sustained suspense to come along in a good while. The caravan of five black Chevy Tahoes—containing Matt, Kate, a dozen or so “friends from Delta,” and a mysterious additional operative, Alejandro (Benicio del Toro)—rumbles over the border bridge and is met by a fleet of Mexican police trucks bristling with machine guns, which underscore the present danger far more than they mollify it.

The cinematography is by the great Roger Deakins (more on this in a moment) and under his lens the low-lying sprawl of Juárez itself becomes a character, as menacing as the Mogadishu of Black Hawk Down or the Baghdad of The Hurt Locker. (The difference, of course, is that it’s a stone’s throw away from El Paso.) I will not describe the outcome of the mission except to say that there are, inevitably, bumps along the way. I’m confident that never before have the phrases “red Impala, two lanes left” and “green Civic, three lanes left” conveyed such imminent peril.

From there, Sicario (the term is Mexican slang for “hitman”) proceeds as a high-intensity procedural—except for the crucial distinction that there’s little or nothing in the way of recognizable “procedure” on display. Matt’s paramilitary plans remain unexplained, and almost certainly illegal, and that’s to say nothing of the inscrutable Alejandro. Moreover, the reasons for Kate’s inclusion on the task force become less and less clear: Initially, it seemed she was being brought along for her SWAT-team grit. But it quickly becomes evident that Matt has all the firepower he needs, and in any case, as the increasingly frustrated Kate points out on more than one occasion, “I’m not a soldier!”

Blunt builds on her recent work in Looper and (especially) Edge of Tomorrow, presenting another portrait in rugged femininity, all wary eyes and chiseled jawline. Brolin brings to Matt a jocky swagger reminiscent of his lead performance in W, and Del Toro, hiding behind beard and sunglasses, offers a heavy, enigmatic charisma as Alejandro. As director, Villeneuve again demonstrates (as he did with Prisoners, also shot by Deakins), a knack for ominous mood and for ratcheting up, almost painfully, the tension of a moment.

As for Deakins, what further accolade can be thrown to arguably the best cinematographer working today? (Oh, that’s right: he can finally win an Oscar after a dozen unfulfilled nominations. Someone get on that.) Deakins plays with a variety of tricks in Sicario: aerial and landscape shots (some reminiscent of Cary Fukunaga’s work on the first season of True Detective), night vision, thermal imaging. There are powerful echoes of his magnificent border-state work in No Country for Old Men as well. The overall result is the best-looking film of the year to date.

In the end, though, it is unlikely to be the best film, full-stop. In its latter acts, the script, by Taylor Sheridan, veers onto a different, narrower course. What began as (apparently) a serious political film instead settles for the less demanding obligations of genre, as the plot becomes more far-fetched, edging toward fable. The narrative point of view mistakenly shifts from Kate to Alejandro, and what began as a critique of violence comes to resemble a stylish exercise in it. This second movie-within-the-movie is not a bad movie, merely a different one. But it does, to some degree, betray the extraordinary promise of what came before. This is the risk with having set its own bar so high: Sicario is a remarkable, thrilling, intermittently brilliant film—and yet nonetheless a mild disappointment.