Even when he was alive, you felt that Peter Barnes was the unjustly forgotten playwright of British theatre. He was the wild, brilliant modern Jacobean rabble rouser who didn't fit into any category or policy of new writing. He found raucous farce and comedy in the Spanish Inquisition and the concentration camps. No-one in his plays said the right thing, wore carpet slippers, puffed pipes or sat in easy chairs.

Ten years after his death, he's more than ripe for revival, and this first play of his, premiered at the Nottingham Playhouse in 1968 and subsequently filmed with Peter O'Toole in the lead, hits you with the gale force of a shocking revelation. James McAvoy is giving a performance of almost overwhelming savagery and brio in the O'Toole role of Jack, the 14th Earl of Gurney. The show unravels not as a Marxian attack on posh people but a hubristic vaudeville of self-immolation and consumption.

This Gurney clan are people who kill themselves for sexual pleasure, plan inheritance scams by impregnating close relatives, commit each other to asylums and make speeches in Parliament that pander to the basest backwoodsman mentality while sounding quite reasonable in themselves. They also dress up as women (the men, that is) and think that psychosis is the same as philosophy, cruelty the soul mate of compassion. They are the people who make this country great. Or so Peter Barnes would have you believe.

Jack, in fact, may be the new Messiah. Or he may just be mad. How on earth (or in heaven) could you tell? No British playwright since Ben Jonson has weaved such a skein of lunacy, artifice, misguided passion and satirical point-scoring. McAvoy's fizzing performance just about holds the whole show together, for director Jamie Lloyd, finishing his second Trafalgar Transformed season, goes totally for broke, as he should, backed by a snazzy and theatrical design by Soutra Gilmour and a great cast of enthusiastic vagabonds.

Serena Evans, for instance, as Lady Gurney, married to the late earl's half-brother, Sir Charles (Ron Cook), is so cut glass she slices your ears off, virtually. Cook, of course, is no slouch, either, when it comes to vicious and malodorous society relics, and their dim-witted son, Dinsdale, the inheriting obstacle to Jack's undeserved wealth, is played by Joshua Maguire like a slimy toad on speed.

Delightful helter-skelter stuff, too, from Kathryn Drysdale, Forbes Masson and Paul Leonard as various upper crust and authority figures. Elliot Levey chips in as a mad German doctor and Anthony O'Donnell as an undercover card-carrying Commie who, in typical Barnes fashion, adores the system he's sworn to undermine.

Harold Hobson, an infuriating but decisive critic, rated The Ruling Class the fourth most important premiere of his reviewing life, alongside Waiting for Godot, Look Back in Anger and The Birthday Party. He alone was right about all these great plays, and perhaps it's not too late for the last one to worm its way at last, and more influentially, into our contemporary theatre.

The Ruling Class continues at Trafalgar Studios until 11 April 2015