I’m not sure what the formal definition of a masterpiece is, but “The Grand Budapest Hotel” strikes me as something very close. Wes Anderson, who wrote and directed those modern classics “The Royal Tenenbaums” and “Moonrise Kingdom,” now gives us “Downton Abbey” on laughing gas.

Sophisticated, silly and wildly incident-packed, it creates a mad rumpus at center stage while hinting at tragedies waiting in the wings. There are fantastically elaborate comic set-pieces, obsessively detailed puppet-theater art direction, and brilliantly crafted action sequences.

This rare fusion of technical rigor and madcap wit seals Anderson’s claim on the title of America’s finest comic filmmaker.

He nimbly evokes a once-upon-a-time Europe of beaux-arts architecture, comic-opera armies and filigreed pastries. He populates this dream world with a sharply drawn regiment of lunatic aristocrats, plucky commoners and blackguards. The production design is eccentric and inspired. The clashing tones of the hotel’s scarlet walls and the staff’s royal-purple livery is a visual joke with a color punch line. As before, Anderson frames his players fastidiously, like gems in an elegant display case.

First among them is Monsieur Gustave, peerless concierge of the Grand Budapest, a gigantic wedding cake of a resort in fictional, alpine Zubrowka. Posture erect to the point of distortion, chin a quarter-inch higher than anyone else’s, this well-turned-out, narcissistic, overtalkative fellow is a cross between Jeeves and Pepé Le Pew. He not only serves the guests, but he also services the richest, blondest and oldest dowagers. Through such acts of chivalry and panache, he offers “a glimmer of civilization in the barbaric slaughterhouse we know as humanity.”

Ralph Fiennes plays M. Gustave with leaping eyebrows, tart line readings and a fey nonchalance about Austro-Hungarian sexual repression. Fiennes is 51 now, a specialist in melancholy aloof romantics and villains. But here this comedic late bloomer is a mercurial miracle.

The discursive plot resembles a Russian nesting doll, with four timelines spanning most of a century. As we step back from the present day to the 1930s, the frame shrinks from widescreen to the anachronistic boxy ratio of prewar studio films. Knockabout comedy plays well in that squarish visual scheme, and what a farce this is. One of M. Gustave’s most satisfied customers, Madame D. (Tilda Swinton, convincingly done up as an ancient grande dame) expires under mysterious circumstances, leaving him a priceless medieval portrait.

As the poker-faced executor of Madame’s will, Jeff Goldblum spouts arias of gibberish legalese in a tone so blandly astringent it’s almost musical. Madame’s glowering son (Adrien Brody, all splutters, rages and tantrums) and his sinister henchman (Willem Dafoe with a werewolf underbite) set out to retrieve the painting by any means necessary. There are breakneck chases and imprisonment, hairsbreadth escapes and giddy, spectacular cliffhangers.

At M. Gustave’s side for most of the film is his protégé, lobby boy Zero Moustafa (performed with bright, sparrow-like innocence by 17-year-old first timer Tony Revolori). Soaking up his mentor’s words of wisdom, and repaying them with acts of boys’ adventure derring-do, he’s the resourceful sidekick who frequently saves the day. He also gets the girl, a brave pastry chef played with winning pluck by Saoirse Ronan. There are significant actors in almost every role: Bill Murray, Edward Norton, Harvey Keitel, F. Murray Abraham, Jude Law and Tom Wilkinson, for starters.

As various narrators dip in and out of the story, we’re left to wonder how much of it, if any, is true. Throughout the movie, Anderson highlights the fakery involved in his elaborate fantasy. The carriage railway that serves the mountaintop hotel is an unabashed paper cutout. The mountain backdrops are blatant matte paintings. Alexandre Desplat’s score is a cockeyed medley of alpenhorns, balalaikas, bells, cymbalum, triangles, whistles and yodeling. If there is a naturalistic moment in this madhouse, I missed it. It’s sheer screwball delight from one of the most original and brilliantly funny filmmakers ever to work in Hollywood.