Matt Damon and Ben Affleck reprised the roles that made them famous onstage in New York on Friday night, with a surprise appearance in a one-off live reading of the screenplay of Good Will Hunting.

The childhood friends were almost unknown when they wrote and insisted on starring in the tale of a young working-class polymath who is mopping floors at MIT when his life is turned around by a therapist, played by Robin Williams, and a Harvard student, played by Minnie Driver. It won the two an Oscar for best screenplay, was nominated for eight more (Williams also won), and provided them with a route to the big time. Today, they occupy numbers three (Damon) and six (Affleck) on the 2016 Forbes list of the world’s highest-paid male actors.

John Krasinski reunited the pair on Friday as part of a Film Independent and New York Times series of “live reads”, in which actors read the screenplay of a film to a live audience. The cast list was not released in advance, allowing Krasinski a moment of pure showmanship before the reading began.

Matt Damon: five best moments Read more

Introducing his cast one by one – including his wife, Emily Blunt, in the Driver role – Krasinski finally came to the leads, announcing that he himself would be playing Will … before Damon unexpectedly marched on to the stage, to a standing ovation from the crowd at New York University’s Skirball theatre.

“Thirty seconds before that, you were happy to see me do it!” Krasinski said. Preparing to sit down and take Affleck’s part instead, he said: “Chuckie’s a better role anyway …”

On cue, the Batman star followed Damon out from the wings, bringing the delighted audience leaping back to their feet.

The 1997 screenplay has held up well, and is often laugh-out-loud funny, much of its charm resting on the witty, wisecracking, believable banter between the dumb but protective Chuckie and his best friend, the brilliant, defensive and confrontational Will. Affleck and Damon slid easily back into characters based presumably on young men they had known or witnessed growing up in Boston, and Affleck in particular – now bearded, tanned and heavy-set – seemed to take great delight in revisiting the ribald put-downs and convoluted anecdotes which pepper the script.

Damon, whose DiCaprio-like quicksilver charisma has become something more stolid and workmanlike, was able to recapture that early magnetism. He was devastating in that indelible scene in which he tells Williams that when his father used to give him a choice of wrench, belt or stick for a beating, he would always choose the wrench – “because fuck him, that’s why”.

Blunt approached the part of Damon’s student girlfriend with something of the English naturalism that Driver brought to the film in 1997, and Krasinski, who read the stage directions, stumbled for comic effect over some of her love scenes with Damon, altering the ending of one to: “They do not kiss,” tripping over the word “postcoital” in another.

Facebook Twitter Pinterest ‘As a kid from Boston, I think we all get tattoos of the poster of this movie.’ Photograph: Allstar/Miramax/Sportsphoto Ltd/Allstar

“It was really good!” his wife blurted out, to which Krasinski asked rhetorically: “You’re really going to take Jason Bourne over Jim from The Office?” Less successful was his casting of The Americans’ Margo Martindale in the crucial Williams role. The gender switch might well have worked, but she was hesitant and seemed under-rehearsed.

Introducing the event, Krasinski made the case for Good Will Hunting as a modern American classic. “As a kid from Boston, I think we all get tattoos of the poster of this movie on your back,” he said, calling it “unbelievably well-written”. In truth, Affleck and Damon lay it on a bit thick in establishing Will’s genius – what is meant to come off as autodidactic brilliance occasionally teeters over into insufferability – and it’s a more sentimental film than it thinks it is, emotionally manipulative in a way that seems mercilessly machine-tooled for maximum effect, particularly towards the end.

But it works. And looking back, it laid the groundwork for Affleck’s career as a director producing compelling thrillers such as Argo and The Town that use tension as shamelessly as Good Will Hunting uses emotion, pleasingly calling to mind the crime dramas of the 1940s and 50s in which taciturn men find themselves forced into intractable situations, weighing up dilemmas about love and corruption and morality. Which, come to think of it, doesn’t sound a bad template for the Batman film Affleck is currently writing.