The implicit irony of a prison play is that it celebrates the liberation of the human spirit, and this clever stage adaptation of Stephen King’s brilliant novella – the rights to the movie were unavailable – is as powerful as any such drama since Kenneth Brown’s The Brig in the mid-1960s.

The Brig was set in a Marines detention centre and charted the gradual destruction of the individual in an Artaudian cacophony of sound and physical movement (it was the breakthrough show for the Living Theatre).

The Shawshank Redemption, more sentimental and optimistic, shows the survival instinct working the system in a desensitised environment that is still not immune to the possibility of change. This is why the play works so well; every performance since the opening at the Gaiety in Dublin has received a spontaneous standing ovation.

The project is a continuation of the “comedians do theatre” initiative that has so far embraced Twelve Angry Men and One Flew Over the Cuckoo's Nest, only this time the comedians are merely the writers, Owen O'Neill and Dave Johns. The leading roles of the unjustly imprisoned banker Andy Dufresne and the story’s mediator Red, the gnarled old lifer and “the guy who gets things”, are taken by Kevin Anderson of Steppenwolf in Chicago and Sunset Boulevard in the West End, and Reg E Cathey of The Wire.

Both are terrific. And both embody lookalike aspects of Tim Robbins and Morgan Freeman in the movie – Red is in fact a white Irishman in the novella – but Anderson is less goofy and thoroughly, quietly convinced of his destiny, while Cathey comes home to roost in the audience’s affection with his own brand of twinkling humour and gravelly vocal delivery.

The clanking prison cell designed by Ferdia Murphy on two levels contains a well-disciplined bunch of shirt-lifting hoodlums led by Joe Hanley’s ferocious Bogs, and Geoffrey Hutchings potters endearingly about as Brooksie, the bent-double librarian who can’t face the outside world. Mitchell Mullen and Shane Attwoll are suitably heavy as the authority figures.

Peter Sheridan’s production is a well-oiled machine with plenty of room for characters to manoeuvre, and the plot developments – the news of Andy’s supposed crime is artfully conveyed by Diarmuid Noyes’ new boy; the transition of Andy from sullen inmate to active financial adviser in the great “pitching the roof” scene – are models of compressed and deeply affecting stage narrative. And the ending is simply glorious, even if the programme cover gives it away before you take your seat.