An audacious gallery heist is the subject of Ian Rankin's 'Doors Open', his crime novel whose TV adaptation airs tonight
Crime writers sometimes get together and ask each other: how would you mastermind the perfect murder? I've asked lots of cops this question, and the answer doesn't make a thrilling plot: get your victim drunk to the point of passing out in their own kitchen. Death by chip pan fire; it happens a lot in Scotland.
You might think a crime novelist would be able to come up with some inventive, near-flawless murder strategies. In reality, when crime writers try to commit crimes, they get caught quite quickly.
Five years ago in Poland a crime writer got away with murdering his wife's lover and later wrote the story of his 'perfect murder' in a novel. His defence was: "Somebody's trying to set me up here. I wouldn't kill someone in a way that's identical to one of my books." He got done.
I've spent most of my career thinking about imperfect crimes, crimes that happen in our society regularly. Racist crimes, crimes of passion, greed and corruption, people trying to bend the system to their will. They rarely get away with it. Normally, my best-known detective, Inspector Rebus, has his woman or man in custody by the end.
When you're planning a heist, though, your focus and your sympathies shift slightly. It's The Man against The System, and we want to know if the system can be outsmarted.
It was through a criminal's eyes that I became interested in the idea of a perfect crime. My novel, Doors Open (2008), which has just been adapted into a TV thriller starring Stephen Fry, was a first for me.
A clean art heist, it takes place in a middle-class Edinburgh that I haven't written about much because Rebus wouldn't come up against something like this. It's genteel, it's bloodless. He's not interested in the art world, he prefers to deal with meaner streets, and there are very few mean streets in the book.
For Doors Open, the characters needed to be heroes – in this case, rather threadbare heroes – so that you're gunning for them to get away with it. They mostly have different, and to some extent altruistic, motives; you don't steal a painting because you need cold cash.
Among our gang is a Thomas Crown figure who wants to steal a painting because he's rich and bored, and it's an exotic prize that reminds him of the woman he's in love with; there's Professor Gissing (the character played by Stephen Fry) who's on a moral crusade to rescue the paintings from the dark; there's also a cynical Banksy-like forger who thinks he's entitled to pastiche and ridicule the art market.
I had been waiting for an opportunity to do a heist, but the trouble with heists, particularly in films, is that you're so often asked to suspend disbelief. A lot of stuff wouldn't work in real life, like dodging laser beams, or getting people who are double jointed to squeeze into air-conditioning shafts. For me, crime fiction should be believable, specific and strong on a sense of place – be it a city or an art gallery.
Whenever I'd go to a museum or a gallery, I'd always clock the security, look for the trip wires and cameras. I'd been waiting for a way in.
It was when I learnt that the Scottish National Gallery takes part in Doors Open Day – an event that gives the public access to art that isn't hung in galleries – that it all clicked into place. The museum stores its reserve collection in an Edinburgh warehouse that's closed to the public 364 days of the year. To a crime writer who is given to thinking like a criminal, that is your chink in the armour. It means that on one day of the year, a gang of professional villains can very easily do something that's normally very difficult. They can just walk in via an open door.
I've always been interested in art. As a student I used to get the night bus from Edinburgh to London to see a Francis Bacon exhibition and then get the night bus back.
When my books became successful and I had disposable income, I would go to auctions.
I enjoyed watching and learning the intricacies of the trade, how the dealers would stand at the back so they could scope out who was keen, or hide how excited they were, or maybe get people to bid a bit further than they normally would by putting a bid in themselves.
Our gang are mostly amateurs, who got to know each other through going to auctions and galleries.
The story begins as a sort of Ealing comedy, with our motley crew teaming up to do things they're not supposed to be doing. My favourite heist movie is Bill Forsyth's first film, That Sinking Feeling (1980), a comedy about a group of teenagers in Glasgow who break into a factory and steal all their stainless steel sinks. They've got a lorry-load of sinks and don't know what to do with them. In fact, one of them ends up as a gallery installation and an art dealer buys it.
In Doors Open, the problem for our gang begins when they get away with it. The class tensions between these amateur criminals begin to show up when they no longer have a team united by an ambition.
As Dostoyevsky's Raskolnikov discovered, even if you get away with a crime, guilt's going to get you in the end. Maybe there is no such thing as a perfect crime. Even if you get away with it, your own morality, your own sense of yourself will have shifted.
I feel my sole responsibility is to entertain, not to deliver a moral message. But at the heart of all my fiction is the basic question: why do we continue to do bad things to each other? Is it a necessary offshoot of the society we've created? Is it the seven deadly sins, lust and envy and greed and everything else?
That's what keeps me coming back to crime, why I can't escape it – and why Rebus can't either.
Doors Open is on ITV1 at 9pm tonight. Ian Rankin's novel is published by Orion, £7.99.