Sam Rockwell, left, and John Malkovich in Wild Horse Nine (Diego Araya Corvalán/Searchlight Pictures)

CIA agent Chris Carlisle (John Malkovich) is not an easy man to like. Beyond his lengthy record in espionage and subterfuge, he’s also scornful, rude, curmudgeonly, and a bit sexist to boot. But worse, due to a combination of his fading health and memory problems, Chris can’t help blurting out classified information to unsuspecting people in broad daylight. Say, for instance, mocking two Chilean college students’ appreciation for their new democratically elected president by remarking how he’ll be out of office very soon.

On this note, Chris is accurate. Wild Horse Nine, the latest drama from Martin McDonagh, takes place in the lead-up to the 1973 Chilean coup d’état that saw President Salvador Allende ousted and replaced with dictator Augusto Pinochet, sparking a decades-long reign of torture and murder. McDonagh takes this backdrop and uses it to tell a story in the vein of In Bruges and The Banshees of Inisherin, a dark buddy dramedy about morally dubious characters, friendship, and the possibility of redemption. It takes a while to bring these pieces together, but the payoff is worth the slow buildup, thanks to Malkovich giving Chris a pathos he might not deserve, but wins you over with anyway.

With the coup set to happen in a week, Chris and his CIA partner Lee Chesterfield (Sam Rockwell) need to lay low. Their handler, MJ (Steve Buscemi), has the duo flown to Easter Island, insisting they take some time to enjoy a vacation and the big stone heads scattered across the land. It’s not exactly a trip that thrills Chris, to the point that he and Lee take offense at tourists calling the monuments by their indigenous name, moai.

In the meantime, Chris is recording notes for a possible memoir that has the CIA spooked, fearing it could lead to his past wetwork leaking to the wrong sources. MJ has charged Lee to keep a close eye on Chris and find out what’s in those tapes. Meanwhile, the more they explore Easter Island, the more each partner opens up about personal issues weighing on them back home: Chris’s estrangement from his reclusive brother, Jim (Tom Waits), and Lee putting up with the long string of affairs of his wife, Marge (Parker Posey). However, their recurring encounters with student activists Monica (Mariana Di Girólamo) and Alicia (Ailín Salas) fail to quell the possibility of Chris blurting out too much.

For much of its first act, Wild Horse Nine introduces a bunch of pieces but doesn’t provide a clear explanation of how they all fit together. Still, those pieces are well-acted and beautifully shot, merging Malkovich and Rockwell’s natural chemistry with the gorgeous, isolated locale of Easter Island captured by cinematographer Ben Davis. There’s a lot of witty banter but not necessarily connective tissue at first glance. The result comes across more like a road trip film than a political drama—aside from the wild horse Chris develops an affection for during his stay, serving as a stand-in for innocence untarnished by the political operations he’s participated in for decades.

Perhaps this is why the back half finds its stride when Chris delivers a haunting rant about the future of Chile. It’s grave and bitter, but also somewhat remorseful, as if he’s finally coming to terms with the true cost of his work. This is where the dynamic between Malkovich and Rockwell truly shines. Underneath their bickering is a sense of deep camaraderie. You can make out the seeds of a redemptive moment being planted, but also plenty of dark humor that helps balance out the somber undertones. Given the film’s subject matter, those laughs make for a necessary reprieve.

This all builds up to a climactic standoff on Easter Island’s outskirts, filled with several major twists and a disquieting yet cathartic payoff. It’s a troubling meditation on what our leads’ actions have wrought, and yet only an actor as skilled as Malkovich could make this characterization feel sympathetic in spite of Chris’s cantankerous behavior. Wild Horse Nine might spin its wheels at first, but eventually its tale of male friendship and political cynicism finds a way to gallop off into the sunset.