Every once in a while, a small, unheralded film comes along, so smart and funny, such a pleasure to experience, you can’t believe your luck. “Hunt for the Wilderpeople” is such a film.

The wacky story of the way-unlikely alliance between a reprobate of a teenager and a surly, wilderness loving loner, “Wilderpeople” was written and directed by New Zealand’s Taika Waititi, whose last credit was the admired vampire mockumentary “What We Do in the Shadows.”

“Wilderpeople” was a surprise audience favorite at Sundance, where everyone who mentioned it smiled at the memory, and with good reason. The film has a gently absurdist quality, a simultaneously sweet and subversive sensibility, mixing warmth, adventure and comedy in ways that consistently surprise.

Much of this tone comes from the novel “Wilderpeople” is based on, “Wild Pork and Watercress” by Barry Crump, an author so beloved in New Zealand he has sold more than a million books in a 4 million-person country.

The combination of Crump’s sensibility, Waititi’s growing stature as a filmmaker and an irresistible story persuaded some of New Zealand’s top actors, starting with Sam Neill, letter-perfect as unbending outdoorsman Hec Faulkner, to take roles in the picture.

But “Wilderpeople” wouldn’t be the success it is without its 13-year-old costar, Julian Dennison. A talented performer in only his third feature, Dennison creates a convincingly multidimensional character.

“Wilderpeople” opens deep in the New Zealand bush, with a police car headed for a remote cabin. In the back seat is sullen Ricky Baker (Dennison), a city kid far from home. Taking Ricky to the latest in a string of foster homes are a policeman and a Child Welfare official, who ominously describes Ricky as “a bit of a handful, a real bad egg.”

Having no such qualms is new foster mother Bella Faulkner (Rima Te Wiata), who gives the suspicious Ricky a hug as big as all outdoors. Bella’s husband, Hec, first glimpsed toting home an enormous wild boar he’s killed, favors Ricky with a look that could freeze molten steel and asks, “Ever worked on a farm before, or are you just ornamental?”

Hec’s disdain notwithstanding, it becomes clear that Ricky is not a bad boy, just neglected. He may say things like, “I’m a menace to society,” but his fondness for hot water bottles (essential for nighttime warmth in the outback) gives him away.

Suddenly, through no fault of his own, everything changes for Ricky. Child Welfare wants him back, and while Ricky, ever the gangster, hopes for “a shootout like ‘Scarface,’ ” Hec plans to disappear into the bush. By himself. Ricky says they could be a team on the run, but Hec contemptuously tells him, “You wouldn’t last five minutes out there.”

Though it’s hardly a shock that circumstances amusingly conspire to make this teaming happen, the wild and crazy comic plot twists, misadventures and misunderstandings that befall this duo manage to be as unexpected as they are amusing.

Essential in this is the utter conviction the two stars bring to characters who really do not have much use for each other.

Neill’s performance is the rock that anchors everything, and Dennison is especially good at revealing the unlooked-for aspects of Ricky, like his fondness for writing haiku and his precocious familiarity with psychological jargon like “you’re still processing.”

Director Waititi, who has an amusing cameo as a minister, is at the heart of “Wilderpeople’s” success.

He not only casually blends entertainment and emotional resonance, he makes creating something both site-specific and universal look like the easiest task of all.