Edition:

The insider: Dennis Lehane

Dennis Lehane, a writer on The Wire, is an American crime novelist best known for Mystic River and Gone Baby Gone, which have both been adapted into Oscar-nominated films. His next novel, The Given Day, will be published in January

I'd known David Simon for a bit, and I knew George Pelecanos quite well. David asked me to write an episode for the third season and I said, 'sure', because I was a great fan. I'd never written for TV before. I was a little out of my depth at first - I wrote too long and too many speeches. In a script, less truly equals more. You have to be more judicious and your characters have to come out and act. There's no time to dick around with them sitting around thinking or talking about what they might do, which is the type of lassitude you can engage with if you're a novelist.

David talks a lot about how he thinks one of the greatest bits of dialogue in film is the line near the end of The Wild Bunch when William Holden says, 'Let's go'. The film is working by that point. That's not to say that brevity is always the soul of the scene. It's saying that if you're doing your job, you should be able to get to the point where you can write a line as simple as 'Let's go' and it carries the entire weight of everything that went before it.

The scene in The Wire that people will be talking about in a 100 years from now will be the 'fuck' scene that David and Ed Burns wrote, with [the detectives] McNulty and Bunk doing nothing but saying the word 'fuck' in all its variations for two minutes as they go through a crime scene. There are so many other ways you could have written that scene but none as fresh and original as that.

The people who have the original vision for a TV show do the architecture and build the structure, as David and Ed did for each season. Then they bring in the writers to fill in the room and hang the dry wall and lay down the floors. I wrote three episodes, one per season from the third to the fifth. I would fly in, because I don't live in Baltimore, and spend three or four days in the writers' room and we'd 'beat out' my episode, then I'd go home and write it. In the writers' room, as well as David and Ed, you'd have the writers George Pelecanos and David Mills, Bill Zorzi, The Wire's political guru, and, when he was alive, Bob Colesberry, the executive producer who played a detective on the show. The meetings were wonderful but you had to know who you were as a writer before you walked into that room, because kid gloves were not in play. Nobody was cracking the whip but nobody was suffering fools either. If you came up with a dumb idea, someone would say: 'No that doesn't work.' Why? 'Because it doesn't.' There was no hand-holding; I had some ideas shot down in flames.

I would come out with what's known as a 'beat sheet', in which the major movements of the episode are all played out for you. You don't have much wriggle room within that, but David said he was always at his best as a writer when the beats were the least detailed. One of the beats I had was simply: Stringer Bell needs to discover that his crew are not as intelligent as he had hoped. That's when I got to write the '40-degree day' speech, which his crew just doesn't get. But nobody told me to write about a '40-degree day'.

Baltimore's issues are the issues of any large urban centre in the US, but I wasn't prepared for the sheer scale of the poverty. Anybody who oversimplifies the issue of poverty in this post-industrialised, alleged first world, should be forced to spend live in a tenement in West Baltimore. It looks like Berlin, April 1945. It was eye-opening for me.

What makes The Wire so good? I don't think there's an ounce of wish fulfillment in it, as there is at the base of most dramas. Every country has its central myth, and one of America's is that good will out. David and Ed just said 'bullshit' to that. But nor do they indulge the flipside, which is that life sucks and then you die. It isn't that simple, it's just that we're all fucked up. Don't go looking for heroes or villains in this show because you'll have a hard time finding them.