The Painkiller (Garrick Theatre)

Kenneth Branagh and Rob Brydon star in the latest offering from the Kenneth Branagh Season

At one point in the farcical action, a harassed hotel porter enters two adjacent bedrooms in quick succession and finds two pairs of men in each one apparently engaged in some unorthodox sexual activity; we are witnessing a policeman on the wrong end of a beating and a psychiatrist in a tussle with his lover's husband.

It's a classic farce moment of a hilarious misreading of the visual evidence, and it's a mark of Sean Foley's finely judged production of this 1969 French farce (adapted by Foley from Le Contrat by Francis Veber) that it's justified by the plotting that surrounds it and leads on to a further accumulation of mishaps.

In one room there is Kenneth Branagh as Ralph, a professional hit-man whose rifle and silencer are trained on a human target, a witness in the adjacent (offstage) courtroom. The stage is divided in two and, in the other bedroom, Rob Brydon as Dudley, a struggling photographer from Swindon ("I had to cover Swindon in bloom"), is preparing a noose to kill himself.

Ralph is strong, assertive, confident, while Dudley is the opposite, the "beg pardon" to Ralph's superiority, so the minute things start to go wrong, it's inevitable that these roles, and indeed the clothes that decorate them, become interchangeable, just as the policeman (Marcus Fraser) will end up in the wardrobe, the psychiatrist Dent (Alex McQueen) will mis-direct his injections of sedatives and amphetamines, and Dudley's wife Michelle (Claudie Blakley in a scarlet dress) will turn up unannounced.

Actually, although Foley and Branagh are on record as saying they have beefed up Michelle's role since they first presented the show at the Lyric in Belfast in 2011, this part of it is the least successful and persuasive in the ticking time bomb of the narrative. But Blakley is a gorgeous comedienne, and she does what she can, while Branagh and Brydon play consistently, even ruthlessly, in character, and win laughs from start to finish.

Apart from there being a very good reason why the porter (the ingeniously inventive, always hangdog and flustered Mark Hadfield) should enrol Ralph to keep an eye on his suicidal neighbour, it would be both fruitless and impossible to untangle all the by-ways of the plot, except to say everything is more or less in place – that is to say, the wrong place – by the end.

Brian Rix was a great farceur but he wasn't a very good actor. Branagh is a great actor who knows how to act farce, mostly through underplaying, and he's very funny; while Brydon – as he did in Trevor Nunn's 2012 revival of Ayckbourn's A Chorus of Disapproval – shows how, through application, you can turn a talent for comedy into first-rate comic acting.

The Painkiller runs at the Garrick Theatre until 30 April.