Vigilantism on both sides of the Mexican-U.S. line is the subject of Matthew Heineman’s powerful but curiously diffuse documentary “Cartel Land,” which begins with one sequence showing meth cookers plying their trade and ends with another. The final message of the film is pretty much one of resignation that it’s futile to confront the drug trade and the violence and oppression it engenders so long as it’s so profitable.

The picture, shot by Heineman and Matt Porwoll under what must have been harsh and demanding conditions, focuses on two groups. One is a small militia band, Arizona Border Recon, headed by gruff army veteran Tim Foley and dedicated to detect and, when possible, capture drug carriers entering the U.S. from Mexico. One hears an undertone of anti-immigrant sentiment in Foley’s explanations of his motives, but the footage of him and his comrades staking out areas where illegal crossings might be occurring—shot with night-vision equipment—is certainly evocative.

Foley’s group, however, plays distinctly second fiddle to Heineman’s coverage of the Autodefensas, a larger group founded and run by Dr. Jose Manuel Mireles in the Mexican state of Michoacan on the country’s west central coast to fight the Knights Templar, the cartel that has terrorized the populace and taken control of many towns. Mireles, a physician who still tends to his patients, formed the group of armed locals because in his view the federal government was either incapable of confronting the cartel or actually in league with it, and the group’s expansion simply consisted of taking his core squad of self-armed men into a town, urging the locals to arm themselves and training them in tactics before moving on to the next community and repeating the process.

In contrast to the coverage of Foley’s Recon group, which is fairly thin and sedate, the footage on the Autodefensas is both far more substantial and remarkably detailed. Foley is shown as a grim, determined sort but not much more, and his companions remain pretty much in the background; their work, moreover, is largely that of reconnaissance. Mireles, however, emerges as a larger-than-life character, a charismatic rabble-rouser who attracts some fairly colorful loyalists to his banner—like a burly, bearded second-in-command who comes to be known as Papa Smurf. We see something of his personal life as well—footage of him holding office hours or shopping with his wife, on occasion during those outings being congratulated by passersby.

Heineman also presents footage of actual street battles of gun-toting members of the Autodefensas with notorious cartel figures and confrontations with squads of soldiers who try to disarm them, along with rallies and speeches they give to the locals. And he includes grisly evidence of reprisals committed by Knights Templar; it appears that ISIS is not the first, or the only, group to use beheading as a tactic of intimidation, and some of the testimony of individuals—like the sorrowful reminiscences of a woman who recalls what the cartel did to her husband and child before letting her go to tell her neighbors of the horrors—is incredible. The squeamish should be advised that there are points in the film at which they’ll want to avert their eyes.

And yet “Cartel Land” is no simple encomium to either of the vigilante groups. Heineman includes the warning of the Southern Poverty Law Center that the Arizona Border Recon should be numbered among extremist organizations, though he goes no further than that and Foley’s intimations of anti-immigrant bias to make the point. The Autodefensas, on the other hand, are sometimes shown to employ brutal tactics themselves—so much so that Mireles must warn them against becoming no better than those they’re fighting (some of the locals excoriate them for going too far as well). And as the group’s history unfolds, he falls afoul of its other leaders—including Papa Smurf—when he rebuffs governmental efforts to fold the paramilitaries into its own forces, even as his domestic life unravels. Ultimately he’s arrested himself.

All of which leads to the conclusion that neither governments nor self-help vigilantes are having much impact in stemming the drug trade or lessening the violence that goes along with it. Those opening and closing meth-lab sequences (which really depend on a single trash barrel being used as a mixing pot) include the observation from one of the masked workers that they know they’re doing a lot of damage by preparing drugs that will be sent to the U.S. “But what can we do?” he says. “We’re poor and there are no other jobs.” As long as that’s true, Heineman’s film suggests, cartel-controlled land will continue to be a sad reality.