The Ghost - Kim Cattrall, Olivia Williams and Pierce Brosnan star in Roman Polanski’s film based on the novel by Robert Harris

Tony Blair is so widely loathed nowadays that it’s easy to forget that he was… it sticks in the throat to say it… once actually rather popular. Like thousands of others, political journalist turned novelist Robert Harris used to be a Blair fan – until he became thoroughly disillusioned over the Iraq war and the erosion of civil liberties.

Luckier than most, Harris found a healthy outlet for his disgust with his 2007 novel The Ghost, a page-turning thriller about a beleaguered former prime minister and the ghost-writer hired to pen his memoirs. Now comes the film version, directed by Roman Polanski and starring Pierce Brosnan as the ex-PM, here called Adam Lang, and Ewan McGregor as the writer – and it’s a chance to stick the boot into Blair, vicariously, all over again.

The Ghost - Pierce Brosnan’s ex-PM gets flak from protestors in   Roman Polanski’s film based on the novel by Robert Harris

In book and film, the unnamed writer gets the gig after the previous ghost-writer turns up dead on a New England beach, having apparently fallen overboard from a ferry. No sooner has he taken the job, however, than Lang – in the US for a fund-raising lecture tour – comes under investigation for war crimes, accused of authorising the illegal rendition of terror suspects in cahoots with the CIA.

Holed up with Lang in his publisher’s bunker-like home on Martha’s Vineyard, the writer then stumbles upon faint clues left by his predecessor that suggest that there are even dirtier secrets lurking in the ex-PM’s closet…

The Ghost - Ewan McGregor stars as the unnamed ghost-writer in   Roman Polanski’s film based on the novel by Robert Harris

Watching Blair’s thinly disguised surrogate get put through the wringer in The Ghost is probably the closest we’ll ever get to see him face retribution for his follies and crimes. Yet from certain angles the film actually flatters the former prime minister. Blair certainly possessed telegenic charm in his pre-orange-tan days, but even his most gushing supporter would have hesitated before putting him on a pedestal with Brosnan.

As for Cherie, well, let’s say she would have been thrilled if she had emerged from all those sessions with personal trainer cum life guru Carole Caplin looking as good as Olivia Williams.

Fortunately, neither Brosnan nor Williams attempts anything so crass as an impersonation and, though the real-life parallels are always present, it’s the twists and turns in the plot (including a suspenseful sequence involving a car’s satellite-navigation device) that hold the viewer enthralled.

The Ghost - Ewan McGregor & Pierce Brosnan star in Roman Polanski’s film based on the novel by Robert Harris

Occasionally, the film strikes the odd false note. A Brit would never refer to “the Times of London”, for example, one of several concessions the script makes for a transatlantic audience (the film is known as The Ghost Writer in the States, incidentally).

“The ghost should be a Brit, They get the jolly old tone right,” says Jim Belushi’s Yank publisher pointedly at the meeting to decide McGregor’s hiring, but it’s tone that the film itself doesn’t always get right.

That could be consequence of Polanski’s own situation, whose parallels with the film’s story have produced some uncomfortable ironies.

Brosnan’s Lang is holed up on Martha’s Vineyard, unable to leave the US for fear of extradition to Europe to face account for a past crime. Polanski, of course, has been holed up in continental Europe for decades, unable to visit the UK for fear of extradition to the US for a past crime of his own – having unlawful sex with a 13-year-old girl in 1977.

Polanski’s history caught up with him this year, of course, and when The Ghost had its premiere at the Berlin Film Festival, he could not attend, stranded as he was under house arrest in Switzerland. Yet even before this, Polanski’s circumstances had a bearing on the film’s production, precluding the use of genuine US and UK locations. Scenes set in coastal New England were actually filmed on the island of Sylt off the northernmost tip of Germany, while Berlin, complete with imported double-deckers, stood in for London.

You probably won’t notice, or care, however, once The Ghost’s grippingly efficient plot gets you in its grasp.

On general release from 16 April. The novel by Robert Harris is published by Random House.

[swf]http://uk.player.filmtrailer.com/v3.1/&mid=3966&channel_user_id=441100180-1&repeat=1&volume=0[/swf]

To activate the sound in the trailer: hold your cursor over the screen to reveal the control panel and click on the volume control in the bottom right-hand corner.