BERLIN -- Brave, provocative and imaginative, this unorthodox documentary shines a light on one of the semi-forgotten atrocities of the modern era: the state-sponsored mass execution of Indonesian communists and other dissidents following the failed coup of September 1965. The Texas-born, Denmark-based director Joshua Oppenheimer began his seven-year shooting process by interviewing victims of the massacre. But he ended up concentrating on the perpetrators, former death squad bosses who remain unpunished and unapologetic to this day. He then made them reflect on their historical sins in a smart and counterintuitive manner, by re-enacting their crimes on camera.

The result is a fascinating film not just about Indonesia but more generally about the corrosive aftereffects of torture, political corruption and genocide. Oppenheimer has even called it an “allegory” for Abu Ghraib and the Iraq war. That might be a stretch, but this Danish-backed project proved powerful enough to bring Errol Morris and Werner Herzog on board as executive producers. With positive advance reviews and U.S. distribution already in place, it should enjoy a healthy festival life, with plenty of potential for niche theatrical runs and high-end TV slots.

Oppenheimer first befriended some of the veteran gangsters who once ran paramilitary murder squads in North Sumatra, a province of 14 million people. Still feared and celebrated as local heroes, partly thanks to their mutually beneficial links with right-wing militias and corrupt politicians, these men wax wistfully about the golden age when they could routinely torture and murder anyone suspected of communist sympathies. Protected by government impunity, they still openly control the region’s protection rackets and run for political office purely to boost their extortion empires. To prevent possible reprisals, the film’s Indonesian crew are all credited as “Anonymous.” Chilling.

In an inspired twist on documentary rules, Oppenheimer invited these proud killers to re-create their crimes on camera in any movie genre they like. The resulting scenes, woven into the documentary, mix Hollywood gangster cliches and gory horror bloodbaths, all spiced with bizarre cross-dressing musical numbers in a psychedelic Bollywood vein. The unexpected vein of humor here is very dark, yet delirious and surreal. Busby Berkeley meets Matthew Barney.

Oppenheimer’s chief subject is Anwar Congo, a dapper veteran gangster with a grandfatherly air and an unsettling resemblance to Nelson Mandela. While one of his grotesque associates freely boasts about raping and killing underage girls and another about casually murdering his Chinese girlfriend’s father, Congo at least admits to feeling moral qualms over his bloody past. Not that this prevents him from demonstrating his favored method of execution: garroting with a wire necklace. Quick, easy and not too messy, he explains.

Credited with about 1,000 murders, Congo now is haunted by guilty nightmares, notably the glaring eyes of a man he once decapitated with a machete. Tellingly, when he relives some of his crimes on camera, he plays victim rather than killer. Toward the end of the film, he even suffers a tearful onscreen breakdown and begins retching violently upon returning to his old killing ground. It is not clear how sincere or self-serving these small acts of contrition are, but Oppenheimer offers little to soothe liberal consciences. This is not a comforting story about closure.

At two hours, The Act of Killing becomes slightly rambling and repetitive in its midsection, the lack of any clear editorial voice sometimes leading to narrative drift. A sharper edit and a little more historical context would have helped with momentum. All the same, this is a jaw-dropping documentary that reopens deep wounds in Indonesia’s recent history, illuminates an ugly chapter in Cold War power politics and reveals terrible insights into human cruelty that most of us probably would prefer not to know.