Buffalo Boys sounds like a comedy about fratters addicted to hot wings. Set in 1860, it’s actually a good-looking, erratic, cartoonish, and ultimately rousing ultraviolent Indonesian Western. The Buffalo Boys, who do end up riding buffaloes into battle, are two Javanese sultan’s sons, Suwo (Yoshi Sudarso) and Jamar (Ario Bayu). Raised on the American frontier by their uncle Arana (Tio Pakusadewo), they’ve been working on the transcontinental railroad when an impromptu gunfight convinces him that before his time runs out, they must go home to Java “to set things straight.” He means to balance accounts with a Dutch colonial strong-man named Van Trach (Reinout Bussemaker), who killed the young men’s father and has ruled the region with an iron fist in a velvet glove. Make that no velvet glove. Make that two iron fists.

To clear space for opium poppies Van Trach has been coercing farmers to incinerate the rice fields they cultivate for food. If any sodbusters refuse, he burns them and hangs their corpses in cages by the roadside. (Presumably, Van Trach would use the same discipline if he were demanding that his citizens plant less controversial cash crops, like Indonesian coffee or tea.) This despot’s ongoing villainy adds to our heroes’ fervor. To Klingons and Sicilians, “Revenge is a dish best served cold,” but to Suwo and Jamar, it’s best served hot, from flashing steel or smoking carbines.

Producer-director Mike Wiluan, who also wrote the original story, aims to put historical fiction about colonial arrogance and rebellion into sweeping mass entertainment form. He’s certainly picked the right genre. A myna-bird of a moviemaker, he cross-breeds the murderous hyperbole of Sergio Leone’s spaghetti westerns with the electric group quests and revolutionary consciousness of Richard Brooks’s The Professionals and Sam Peckinpah’s The Wild Bunch. (At the thrilling climax, he adds firepower more suitable for the campy Wild Wild West.) In letters big enough to read across the street, a sign outside a saloon proclaims, “WHITES ONLY.” Van Trach’s method of “registering” his subjects is searing his trademark (“VT” ) into their flesh with branding irons—as the rancher-hero of Taylor Sheridan’s smash cable Western Yellowstone does to his lifetime workers and accomplices, with the letter Y. What Wiluan’s movie lacks in subtlety, consistency, or depth, it makes up for in confidence, gusto, and local color, like a trip to the Javanese sultans’ burial ground and its magnificent spired ruins. When Ariana tells his nephews they belong to a civilization that flourished a thousand years before, we respond to Ariana’s sage delivery (Pakusadewo gives by far the most affecting performance) and to the moviemaker’s compulsion to insert that point of pride.

Taking on Van Trach and his men is a job that calls for The Magnificent Seven. But Suwo and Jamar manage it with aid from kith and kin, such as Kiona (Pevita Pearce), the feistier of a village patriarch’s two granddaughters. She gallops into the picture on an Indonesian buffalo while shooting arrows as confidently as Woody Strode in The Professionals. Described in the press notes as “the Kim Kardashian of Indonesia, without the personal drama,” Pearce warms up the movie with her open face and impassioned presence. The callow, untested Sudarso, a Hollywood stunt man on films like Logan as well as the actor behind the Blue Dino Charge Ranger and Green Hyperforce Ranger in Power Rangers TV series, holds his own with the gruff, hard-bitten Bayu, an Indonesian action star. What these guys do in Buffalo Boys is a mashup of mixed martial arts, wuxia, and gunplay. Blades glint as fist, feet, bullets, and arrows fly. Broad black comedy collides with horrific atrocities.

When Suwo, Jamar, and Ariana sneak into Van Trach’s town in hooded cloaks, right before a public execution, they could be Robin Hood entering Nottingham under the Sheriff’s nose. I was hoping they’d save their allies from the Dutchman’s noose in exhilarating fashion. No such luck. Wiluan means to shove the ugliness of Western empire-building in our faces. The director’s showmanship saves the day. He hands Van Trach a terrific imperial bad-guy speech about his rational form of rule and his rescue of the region from native chaos. (Bussemaker, who debuted in Paul Verhoeven’s The Fourth Man, delivers lines drenched in cynicism with a tingling, jaded flair.) Wiluan surrounds him with colorful grotesques, including a huge bare-chested hangman in an S&M-style outfit complete with horror-movie mask (with rows of fake teeth) and a rabid female soldier whose crazy eyes pop and rotting smile widens as Van Trach whets her appetite for carnage. She’s a militarized Madame Defarge cheering on her version of the guillotine.

Wiluan’s setpieces over-rely on the heroes’ playing dead, pulling off trick shots, or maximizing the destructive power of convenient props. He is adept at showcasing his stars’ athletic prowess. Bayu goes all jujitsu on a muscular behemoth in the opening brawl, but he isn’t too pure to finish the bout with the help of a heavy lock and chain. Sudarso’s Suwo tosses knives as swiftly and precisely as James Coburn’s strong, silent Britt in The Magnificent Seven: one slick move transforms Van Trach’s most psychopathic henchman into a Cyclops.

John Radel’s cinematography drinks in emerald rice fields and hidden valleys as round and spiritually appealing as Hindu mendicants’ bowls. In the Javanese air, even the dust looks pale gold and pink. Radel accents the two lead characters visually: Suwo may sport a modest beard and moustache, but we think of him as the smooth man and Jamar as the rugged one. Suwo feels underrated and judged as the younger son. He inevitably clashes with Jamar in a sibling variation on the second-act fight in buddy movies.

After kinetic blowouts of colonial mayhem, it’s reassuring to watch the brothers enact the traditional love-hate moves of male bonding against the brown-grey rock and greenery of a waterfall in the deep forest. In Buffalo Boys, familiarity breeds affection.

Michael Sragow is a contributing editor to Film Comment and writes its Deep Focus column. He is a member of the National Society of Film Critics and the Los Angeles Film Critics Association.