We do like to see people with a rock-solid faith in their own infallibility come a cropper. That’s farce. Of course, it can equally be tragedy. Terry Johnson’s new production of his 1993 play Hysteria about the psychoanalyst Sigmund Freud towards the end of his life treads the tightrope between the two genres with nerve-racking skill.

Freud is a sick man, a refugee from Nazi-occupied Austria, living in north-west London as the Second World War belches over the European horizon. Into the consulting-room which he has re-created from those books and artefacts he has managed to salvage from Vienna erupt the surreal painter Salvador Dali, himself persona non grata in Franco’s Spain, and Jessica, a girl with a problem. To be accurate, a whole shelf-full of problems.

All three have their own, highly individual agendas to pursue. So in his own way does Freud’s doctor, the devout Jew Yahuda. From the moment the curtain rises on Lez Brotherston’s quite brilliant set with Antony Sher as Freud first contemplating and then analysing the silence and attention of both the audience and the iconic patient’s couch, we are in for a roller-coaster of verbal wit, plot and role reversals and a feast of fine acting.

Sher dominates the stage, whether his character at any particular moment is in command or relegated to being the butt of other people. You don’t necessarily admire this Freud, let alone actually like him, but you do try to follow where his mind leads. Will Keen has great fun with Dali, an over-the-top poseur with all the flamboyance of Carmen’s Escamillo. There’s dignity as well as sincerity in David Horovitch’s principled Yahuda, a man with compassion as well as a conscience.

Not quite what she seems is Jessica. Indira Varma brings out all the contradictions of the role as she blackmails Freud into making her his last patient with a succession of about-turns which has the audience alternatively wincing with embarrassment and exploding into laughter. Farce and tragedy, after all, are twin sisters. Can any of us know which one is about to materialise from behind the curtain? Or on the couch?