We’ve had examples of prison literature throughout history, but The Ghost Writer may be the closest we’ve ever had to prison filmmaking. Roman Polanski shot the footage prior to his arrest last year, after which he proceeded to edit the film and make postproduction decisions from a jail cell in Switzerland.

Whatever personal strain the filmmaker may have been under, there’s no sign of it in this chilly, resentful, brainy, fleet-footed political thriller. Whether you think of Polanski as a martyred artist laboring under unfair restrictions or a disgusting pervert who shouldn’t be allowed to work at all, it’s hard to see this thing without admiring the craftsmanship that went into it.

film_1The movie’s title character is a British writer (Ewan McGregor) whose proper name we never learn, an experienced hand at interviewing celebrities and turning their ramblings into autobiographies on short deadlines. The “ghost” lands the plum assignment of collaborating on the memoirs of Adam Lang (Pierce Brosnan), a disgraced former British prime minister now in exile at a secluded beach house on Martha’s Vineyard, along with a coterie of yes men, his embittered but still loyal wife Ruth (Olivia Williams), and a flirtatious chief of staff (Kim Cattrall) whom he’s probably sleeping with. That’s just one of many secrets pervading the house, and the more the writer looks into Lang’s past, the more unsettling information he digs up related to the war crimes charges that Lang is currently facing in Europe. Soon the scribe is looking over his shoulder at people following him to his hotel. Given that he landed this job only after the corpse of the project’s original ghostwriter washed up on the beach, you can’t blame him for fretting.

FWW VITA 300x250

Most of the dirt on Lang stems from his abetting some dirty deeds by the U.S. government, and it’s hard not to feel that Polanski is working out some personal grudges here. However, this movie is based on The Ghost, the quite entertaining, thinly veiled 2007 mystery novel/hatchet job on Tony Blair written by acclaimed novelist (and Blair’s former friend) Robert Harris. The scrupulously faithful script by Polanski and Harris keeps the book’s bitchy, satiric tone, much of its wisecracking dialogue, and even tiny elements like the ghost’s appalled reaction to how bad Lang’s writing is. The novel’s best sequence — a diabolically clever scene with a major plot twist being sprung by an SUV’s satellite navigation system — is here, too. Followers of British politics will relish matching up the movie’s characters with their real-life counterparts.

The rest of us can relish the acting, which is excellent apart from Cattrall, who’s surprisingly inept at maintaining a British accent considering that she was born in Liverpool. McGregor (who hasn’t lost his flair for playing charmingly callow lightweights) makes a neat contrast with Brosnan, who’s well in his element as a suave backslapper with deep dark recesses. The tiniest roles are played invigoratingly: Tom Wilkinson as a wonkish professor who’s plenty dangerous when he’s prodded, Eli Wallach as a random old dude with some clues about the last ghostwriter’s fate, and Jim Belushi cast way against type as a Manhattan publishing magnate. The acting honors here go to Williams, playing the smartest, most devious, most layered person in the Lang house. She gives a performance swirling with jaded self-loathing and frustrated ambition, and she’s particularly shattering in a scene when Ruth confronts the realization that her husband might be no better than a mafia boss ordering hits on his enemies.

Polanski’s lesser thrillers like Death and the Maiden and The Ninth Gate were guilty of being visually drab, but here the muted look of the film adds to the suspense. Lang’s mansion-like beach house is a great backdrop by production designer Albrecht Konrad, an austerely Modernist dwelling that homeowners might well envy but whose burnished surfaces take on an air of menace as the story progresses. No less threatening is the atmosphere outside the house, as the wintry setting makes the rainy, windswept Vineyard (actually the coast of Germany) seem like a wild place near the end of civilization, with groundskeepers glimpsed outside the window making comically futile efforts to keep things in order. Prolific composer Alexandre Desplat contributes to the gathering paranoia as well.

The Ghost Writer’s final shot, the one major alteration that the movie makes to the book, is a marvel of narrative elegance even though I found the deeply cynical ending to be contrived. (Then again, I still believe the same thing to be true about the ending of Polanski’s Chinatown, so what do I know?) It’s a fine, understated capper to this cinematic equivalent of a really good airport novel that keeps you turning the pages.