The Madness of George III is as perfectly realized a play as you’re ever likely to see. In fact, it flirts with coming off a little too perfectly at times, and no wonder: Brit playwright Alan Bennett has had multiple opportunities to fiddle with his already masterful account of an English monarch’s mental breakdown since it first saw light in 1991. Bennett wrote the Oscar-nominated script for the 1994 movie version as well as an adaptation for the American stage. According to a program note, the Madness on display in Penny Metropulos’s sharp new production for Chicago Shakespeare Theatre combines elements from all three previous incarnations.

The combination of Bennett’s extraordinary wit and 20 years of buffing yields a play in which pretty much everything you’re likely to think of has been anticipated and beautifully wrought. Did it occur to you that Shakespeare had his own mad old king, Lear? Bennett found that parallel early on, and made it the basis of a gorgeous scene. Do you hear an erudite echo of Richard II in King George’s oddly precise ravings? Bennett put it there. He also supplied a sly reference the French Revolution, some evergreen bits on taxes, and a cute little throwaway line connecting a royal page named Fortnum with the London luxury goods store Fortnum & Mason.

And yet, against all odds, there’s no sense of overkill. Soon to turn 77, Bennett started his professional showbiz career by partnering with Peter Cook, Dudley Moore, and Jonathan Miller on the legendary 1960 comedy revue Beyond the Fringe, and he’s maintained a strong sense of the ludicrous throughout his career. His willingness to twit even those with whom the audience is likely to identify—abolitionist Whigs, for instance—helps keep the show alive and airy throughout its three-hour running time.

Madness deals with England’s 1788 regency crisis, triggered when the same George who lost the American colonies appeared to crack up. Formerly an unspectacular but more or less competent king who cultivated a Dubya-esque sense of himself as an upright gentleman farmer, King George III suddenly started suffering delusions and acting out. In Bennett’s telling, his main symptoms are logorrhea (“I have to talk to keep up with my thoughts”), potty mouth, purple urine, and a sexual obsession with Lady Pembroke, the queen’s lady-in-waiting.

The king’s collapse threw the government into chaos. Bennett shows us the maneuverings that went on between the Tory prime minister, William Pitt the Younger, and a Whig faction anxious to install the Prince of Wales as regent. But the central drama here concerns George himself as he struggles to keep a grip on his family, sanity, health, authority, and sense of self.

This being the Enlightenment, doctors are summoned, and each has his hobbyhorse. One is into pulse rates and purgatives. Another is absolutely fascinated by stool samples. A third puts hot cups on the royal skin to blister it—that is, to create raw wounds through which bad humors are supposed to flee the body. A half-step removed from necromancy, the learned hucksters perform a medicinal Punch-and-Judy show that’s at once hilarious and—considering the whomping it gives the king—horrific.

After a while along comes Dr. Willis, a clergyman-turned-psychologist who administers a kind of talking cure liberally supplemented with leather restraints. He can be regarded as a hero of the piece since he manages to keep the more dangerous quacks from killing King George outright. But his techniques are as punitive in their way as anyone else’s—and more insidious. Like a primitive Werner Erhard, Willis believes the king must be broken of his arrogance before he can be brought back to health. Madness turns out to be less about what breaks in King George than what endures and finds its way back to the surface.

With all its fits and roars, the role of George itself looks like something of an endurance test, and Harry Groener—an import with lots of Broadway credits—passes nicely. He’s especially affecting in passages of intimacy with Ora Jones’s delightful Queen Charlotte. But he’s only the head of a marvelous retinue. James Newcomb combines asperity and compassion as Dr. Willis. David Lively reaches interesting depths as Edward Thurlow, George’s Lord High Chancellor, who finds himself compromised as he tries to maintain his power. Richard Baird and Alex Weisman make a fine, fey pair as George’s incorrigible sons. And as the three doctors, Bradley Armacost, William Dick, and Patrick Clear manage to be clownish while never letting us forget how truly dangerous they are.