The opening scenes of “Jojo Rabbit” evoke the obsessive visual stylings of Wes Anderson, as a 10-year-old German boy, Jojo (Roman Griffin Davis), heads off to a Hitler Youth camp blissfully tricked out in full uniform. But rather than remain at emotional arm’s length, as Anderson’s work tends to do, director Taika Waititi’s self-described “anti-hate satire” blossoms into a big-hearted black comedy with the thorniest possible subject at its center.

Jojo, a creative kid entranced by the trappings of the Nazi “club,” as one character puts it, has conjured an imaginary best friend: a version of Adolf Hitler (Waititi) who’s sort of half-epic adventure hero, half-fellow 10-year-old trapped in the body of, well, Hitler. With the mustache, slicked-down hair and swastika armband, Waititi (who’s half-Jewish and half-Maori) is squirm-inducing to look at, and it’s initially hard to know how to feel about him. Which is, I imagine, intentional.

In Jojo’s real life, but no less cartoonish, are the Nazis who run the Hitler Youth camp, headed by Sam Rockwell’s drunken Captain Klenzendorf and Rebel Wilson and Alfie Allen as his mindless assistants. (Wilson’s accent is pretty iffy, but she does a killer dead-eyed grin as she revs up the kids for a book-burning campfire.) Later, Stephen Merchant (“Good Boys”) shows up as the head of a group of Gestapo agents; the comic actor’s toothy grin and lanky, towering stature have never been used to such unsettling effect. An endless round robin of Heil Hitlers that ensues in their tense house-raiding scene is pure slapstick — but also points to the hollowness of cruel ideologues powered by blind loyalty.

Meanwhile, Thomasin McKenzie (quietly powerful, as she was in “Leave No Trace”) is a young Jewish woman hiding in Jojo’s attic. She becomes, pointedly, a storyteller within the story, as she toys with Jojo’s notions of what Jews are really like.

When the truly horrible rears its head — as it inevitably will — Waititi’s camera doesn’t look away, although his gentle gaze never lingers on atrocities. Jojo’s mother (Scarlett Johansson, glamorous if a bit generic in a supporting role) literally grabs her son’s face and forces him to confront the truth of the real Hitler’s Germany head-on. Davis, whose huge eyes take in everything around him with increasing alarm, is impressive in his professional acting debut.

Absurdity and terror rub elbows freely here, though Waititi (“Hunt for the Wilderpeople”) is clearly more comfortable with the former and takes every opportunity to throw in a gag, including one groaner about German shepherds. There will inevitably be those who find “Jojo Rabbit” in poor taste, maintaining this chapter of history is no laughing matter. But the reason Waititi’s films (yes, even “Thor: Ragnarok”) are so resonant is that they’ve always placed love and humanism at the heart of their humor. “Jojo,” despite going to some very dark places for its laughs, is no exception.