Mention the name Jim Carrey and an image of rubber-faced gurning is usually the first thing that comes to mind.  Yet The Majestic, showing on ITV1 tonight,  sees him deliver a subtle performance that brings to mind a latter-day James Stewart or Gary Cooper in a Frank Capra comedy.

Released in 2001, the film was third heart-warming fable in a row from director Frank Darabont. His first two films, The Shawshank Redemption and The Green Mile were life-affirming prison dramas based on Stephen King tales. The Majestic, set in 1951, was similarly uplifting in intent; an unashamedly sentimental fable celebrating the patriotism of America’s so-called Greatest Generation, small-town movie theatres and the US constitution.

At the outset, however, Carrey’s protagonist couldn’t be further removed from those values. His shallow, self-seeking Hollywood writer, Peter Appleton, is on the verge of the big time. His swashbuckling B movie, The Sand Pirates of the Sahara, has just opened on a double bill with The African Queen and his girlfriend is a hot young starlet.

Then nemesis strikes. He unwittingly falls foul of the era’s Communist witch-hunts and is ordered to appear before the House Un-American Activities Committee. Instead, he takes flight one stormy night in his Mercedes convertible, drunkenly crashes his car and ends up in a river.

He washes up in the small town of Lawson, minus his memory. But the townsfolk find something uncannily familiar about the amnesiac stranger. Could he be medal-winning hero Luke Trimble, who went missing in the war?

Before long, Peter finds himself enthusiastically embraced by the town, first by Luke’s father, Harry (Martin Landau), owner of the town’s decrepit cinema, The Majestic, and then, more hesitantly, by Luke’s former fiancée, Adele (Laurie Holden). What will happen when he regains his memory?

In Me, Myself & Irene, Carrey played the two sides of a split personality. Without recourse to his familiar facial contortions, he does something similar here, as selfish, apolitical Peter gradually takes on the attributes of the heroic Luke. It’s a subtle performance, full of careful nuances, but Darabont’s film doesn’t really do it justice.

Darabont is seeking to recapture the spirit of Frank Capra’s populist films of the late 30s and early 40s, with Carrey in the role of a James Stewart or Gary Cooper. Yet even though Darabont shares Capra’s dewy-eyed optimism, his film’s sluggish pace means he lacks Capra’s screwball zest. Besides, The Majestic’s simple-minded idealism sits less happily in the more politically ambivalent McCarthy period. But The Majestic is well worth a view, not least for a reminder that Carrey can do serious as well as wacky.

The Majestic is showing on ITV1 at 10.35pm tonight.