The idea of a nearly three-hour-long German comedy may sound like a contradiction in multiple terms. Germans have never been famous for their sense of humor, just as longevity has never been the soul of wit. “Toni Erdmann,” however, the latest film from writer-director Maren Ade, is all about breaking rules and upending expectations. Achingly funny, frequently bizarre and as long as an afternoon, it’s a one-of-a-kind experience and a strange kind of masterpiece.

“Toni Erdmann” stars the endearing Peter Simonischek as Winfried, a schoolteacher well into middle age but still fond of practical jokes — the dumber the better. We first see him at his door wearing gnarled false teeth and telling the delivery guy he’s signing for a mail bomb. Bearishly built but slightly melancholy, Winfried isn’t simply a sad clown. As with everyone and everything in this film, he’s not so easily pegged.

advertisement | advertise on newsday

Winfried is puzzled, as are we, that his daughter, Ines (Sandra Hüller), has grown into such a humorless, joyless woman. A management consultant in Bucharest, Ines climbs the corporate ladder without rest and without much pleasure. Sensing or perhaps imagining her cry for help, Winfried pops in those teeth and transforms himself into Toni Erdmann, a successful if rather disheveled “life coach” who tries to brighten Ines’ world by barging into her work functions and social gatherings.

Essentially a series of increasingly outrageous scenarios, from merely awkward conversations to a party that accidentally turns nudist, “Toni Erdmann” walks an emotional high wire for its entire 162-minute running time. Winfried is a lovable figure but also a maddening one. What kind of father risks botching his daughter’s career? Ines, meanwhile, seems truly toxic, a blatant kiss-up and sexual manipulator, yet we yearn for her redemption.

This weird, wonderful, sorrow-streaked comedy boils down to a simple and poignant message. Eventually, Winfried has to drop the act and turn serious. “The problem is that you so often have to do this or that,” he tells his daughter. “But in the meantime, life is just passing you by.”