When, in 2001, the actor Frankie Faison accepted the role of deputy commissioner Ervin Burrell in a new HBO drama called The Wire, he thought he was signing up for a cop show. “I was expecting it to be more about wiretapping,” he remembers with amusement. “It evolved into something much more fascinating.”

HBO laboured under a similar misapprehension because The Wire’s creator, David Simon, had pitched the show to them as an unusually thoughtful police procedural, not an anatomy lesson in US dysfunction that he really had in mind. “I sold it as a cop show, but they don’t know it’s not really a cop show,” he told the novelist George Pelecanos when he invited him to join the writing team. In fact, he said, it was something audaciously new: “A novel for television.”

Wendell Pierce, Dominic West, Sonja Sohn and Clarke Peters. Photograph: Everett Collection/Rex Features

Exactly 10 years after its final episode aired, The Wire is established as one of the greatest shows in the history of US television – some would say the greatest. But, while shows such as The Sopranos and Mad Men launched with loud fanfares and walked paths strewn with accolades, strong ratings and Emmy awards, The Wire’s route to the pantheon was a long slog. “David Simon had to fight for every season,” says Clarke Peters (Det Lester Freamon). “Nothing was ever guaranteed.”

The story began in 1984, when Simon, then a journalist on the Baltimore Sun, was covering the wiretap-related arrest of a local drug lord, Melvin Williams. Ed Burns, 14 years his senior, was the detective leading the case. As both of them were blunt, abrasive, fiercely intelligent and morally enraged by the status quo, they became friends. After Simon’s 1991 nonfiction masterpiece Homicide: A Year on the Killing Streets became a hit NBC show, Homicide: Life on the Street, which ran for seven seasons between 1993 and 1999, both men quit their jobs. Burns became a teacher, and the two collaborated on the 1997 book The Corner: A Year in the Life of An Inner-City Neighbourhood, which examined the futile cruelty of the war on drugs from the other end of the telescope. The Corner became an HBO miniseries, which enabled the 40-year-old Simon to pitch The Wire to HBO’s CEO, Chris Albrecht, and entertainment division president, Carolyn Strauss, as “the anti-cop show, a rebellion of sorts against all the horseshit police procedurals afflicting American television”.

The Wire ushered in a new interest in African American stories Actor Sonja Sohn

Simon would later describe The Wire in different ways: as “Greek tragedy for the new millennium,” with sclerotic institutions playing the role of callous, indifferent gods; as a story about “the triumph of capitalism over human value”; and as a chronicle of “the decline of the American empire”. On Homicide: Life on the Street, NBC executives would repeatedly ask the writers: “Where are the victories?” The Wire avoided victories, preferring to show corruption, failure and decay. In this show, reformers would be thwarted, crooks rewarded and ordinary people ground down by the system. The Wire was as much journalism as entertainment – a form of protest television. The most frequent question asked in this writers’ room was: “What are we saying?”

When The Wire began production in late 2001, Simon’s and Burns’s burning conviction was inspiring. “They were two different cats,” says Peters. “I felt an avuncular vibe from Ed. David was blinkered and focused, always under pressure. He really had to hold the reins of this team of horses so that they didn’t gallop away.”

John Doman … played William Rawls Photograph: Dave Kotinsky/Getty Images for Coalition Again

“They were such a unique pair to be writing this show,” says John Doman (deputy commissioner William Rawls). “Their view was from the inside out, not from the outside in. They knew the stories and the characters first-hand. I think The Wire really tore the cover off an American city and showed that, for so many people, the American dream was dead.”

Simon was an authenticity hound who described his writing as “stealing life”. If the people he was writing about didn’t think his work rang true, then he had failed, regardless of what viewers thought. So he drew on individuals, anecdotes and snatches of dialogue that he had picked up as a reporter. Believing that most television writers didn’t have an ear for the streets, nor much interest in the lives of people living in poverty in urban areas, Simon put together a team of crime novelists (Pelecanos, Dennis Lehane and Richard Price) and former colleagues from the Baltimore Sun.

“The final decision was always David’s, but he encouraged debate and wanted to be persuaded that there was a better way to go, if you could argue it successfully,” says Rafael Alvarez, a former reporter who became a staff writer on season two. “In one meeting, David and Ed went at it, over something I don’t recall, for more than an hour-and-a-half, with the rest of us watching like it was Ali v Frazier.”

Idris Elba as Stringer Bell. Photograph: David Lee/HBO/Blown Deadline/Kobal/Rex/Shutterstock

The show’s casting director, Alexa Fogel, also broke with industry norms, assembling a richly textured cast of stage actors, Britons, musicians, underused veterans, promising newcomers, complete novices and even some of the real cops, gangsters and politicians who inspired certain characters. “The number of African Americans cast on the show was groundbreaking for its time,” says Sonja Sohn, whose Det “Kima” Greggs was the strongest of the handful of female leads in The Wire’s very male universe. “I think I played the first black lesbian on television. The Wire ushered in a new interest in African American stories.”

Simon encouraged his writers and actors to conduct field research. “Wendell Pierce [Det Bunk Moreland], Dominic West [Det Jimmy McNulty] and myself went out on some ride-alongs with Baltimore cops,” remembers Doman. “The cops were so blase. We went to the hospital, and one guy had been shot 13 times. The cops were standing around drinking coffee. It was another day at the office for these guys, but our eyes were popping out of our heads.”

Simon’s attention to detail could be exhausting, but it was all in the service of telling the truth. “David was always there, making sure everything was done right,” says Faison. “People in Baltimore were very passionate about this show. It put them on a stage where they could be seen. Everyone who came up to me said: ‘Good for you guys. Ain’t that the truth.’”

As for the viewers, Simon wrote in his foreword to Alvarez’s 2010 book about the show The Wire: Truth Be Told: “The first thing we had to do was teach folks to watch television in a different way.” The Wire’s novelistic ambition messed with standard rhythms of television, interleaving drama with the “anti-drama” of everyday life. It dared to slow down and stretch out, demanding unusual patience and attention from viewers. “It went way beyond mere entertainment,” says Aidan Gillen (local politician, Tommy Carcetti). “It dealt with issues that no other shows would be interested in dealing with. It didn’t compromise in any areas. To get it, you had to watch and listen, and there was a risk that people might not have bothered, but they did.”

The show made me feel that people don’t want to be dumbed down Actor Clarke Peters

While many prestige dramas, before and since, focused on a charismatic antihero, or at least a tight ensemble, The Wire didn’t have a central character unless you count Baltimore itself. Each season introduced characters while expanding or contracting the roles of existing ones without warning. To keep the cast “in the present tense”, only the writers knew what was coming next. Actors waited in suspense for each week’s script, some wondering if their characters would make it out alive.

“People started disappearing and my paranoia kicked in,” says Peters. “I could pick up the script and someone might say: ‘Did you hear what happened to Freamon the other night?’ That was an ever-present spectre. In hindsight, that’s what living in Baltimore is like. You can catch a bullet filling up your car with gas.”

“Initially, I just thought I was going to do a couple of episodes,” says Isiah Whitlock Jr, whose corrupt senator, Clay Davis, barely appeared in the first two seasons. “I had no idea where it was headed. It was quite a ride.”

Tracking the methodical investigation into the Melvin Williams-inspired crack kingpin Avon Barksdale and his ambitious consigliere Stringer Bell, The Wire debuted in June 2002 to modest acclaim, attracting a mostly black fanbase of people who saw their lives reflected in the show: Doman remembers being approached by cops who would say: “I work for an asshole just like you!”

Sonja Sohn as ‘Kima’ Greggs. Photograph: Allstar/HBO

It was with season two, which looked at “the death of labour”, that Simon made clear his intention to “build a city”. Otherwise, he told Burns, “we truly are doing just a cop show”. He wanted to show the connecting thread – the wire – that ran between seemingly different organisations and the people who worked in them. Alvarez believes that if Simon hadn’t succeeded in pitching The Wire, the themes driving the five seasons might instead have inspired five books. Whether he was exploring police departments, drug cartels, labour unions, the school system, newspapers or city hall, Simon was interested in how the machine worked, or failed to work. If he could explain Baltimore, then he could explain the US.

“One of the problems here in the US is that we try to deal with the solution without understanding the why,” says Whitlock. “I always felt that The Wire explained to you the why. It said we’re gonna take it real slow, go deep and show you the whole landscape.”

Isiah Whitlock Jr … AKA Clay Davis Photograph: Maarten de Boer/Getty Images Portrait

For viewers who embraced the first season as a gritty crime drama with a predominantly black cast, however, the pivot in season two to the travails of white dockworkers was a jolt, even as it pulled in new viewers. “I thought: ‘What the fuck is this? What happened to our drugs?’” says Peters. “For me, it was a way of saying: this isn’t about you. This is about the city of Baltimore. It was necessary.”

Season three’s plot strand about Carcetti’s bid to become mayor of Baltimore even confounded some of the writers. Pelecanos, who lived in Washington DC, found politics “fucking boring”, but came around when he saw the results. Sooner or later, everyone learned to trust Simon’s vision.

Over time, the cast and the crew of The Wire became a tight-knit family. “I had a rough time during the first season,” says Sohn. “The guys who supported me through that remain my brothers today.”

The younger actors developed a reputation for hell-raising. Gillen remembers Simon warning him to “make sure and tape bail money to your person” before hitting the town with certain cast members. Older actors migrated towards the calmer climate at Peters’ house, a bohemian salon that became known as “the academy”. Meanwhile, HBO established outreach programmes to give something back to the city. “Because of our celebrity, some hard-heads who might want to sling crack or sling a bullet in your direction all of a sudden become little kids, and you have a window to touch their humanity,” says Peters. “We became actors on a mission because we had met the characters in the machine of Baltimore.”

I had no idea that the show was going to become a cultural phenomenon Writer Rafael Alvarez

By season three, the cast was beginning to get recognised in the street outside Baltimore, but with ratings low and Emmy recognition negligible, HBO felt that the downfall of original antagonists Barksdale and Bell marked a natural conclusion. “HBO was spending all its promotional money on The Sopranos,” says Doman. “We were underground for a long time. We never knew whether we were going to get renewed until the last minute.” Simon insisted that he wasn’t done yet. He still wanted to explore the perverse incentives of Burns’s profession (teaching) and his own (journalism), and cajoled Albrecht and Strauss into letting The Wire live.

It was a wise U-turn because the next season was the show’s artistic zenith. “Season four is where it broke open,” says Gillen. “I think centring the narrative around four teenage kids whose plight you couldn’t help but fret over brought a lot of people in.” Stephen King wrote that The Wire “has made the final jump from great TV to classic TV”. Even the divisive final season, in which Simon ground his axe with the media a little too loudly, didn’t dent its reputation. Then one final twist: The Wire’s popularity only really boomed once it was over.

“A critical mass of critical praise had been established just in time for the series to be released as a DVD box set,” says Alvarez, who is now a novelist and screenwriter. “It spread very quickly, sort of like, ‘Did you hear the new Beatles song? You haven’t? You must!’ I had no idea that the show was going to become a cultural phenomenon to the degree that Barack Obama would one day cross paths with Andre Royo [the informant Bubbles] and call out: ‘Hey, Bubs!’ No one knew.”

Aidan Gillen … breakout role. Photograph: Vittorio Zunino Celotto/Getty Images

A decade later, The Wire’s legacy is unimpeachable. It established Simon as one of TV’s great auteurs: he is currently working with Pelecanos on season two of his latest HBO show, The Deuce. It transformed the careers of several actors, notably West, Gillen, Idris Elba and Michael B Jordan. “I thought, at the time, that nobody was paying much attention,” says Whitlock. “More people recognise me from the show than they ever did. I run into people who have just seen it and they want to talk to me about it. I have to tell them it was 10 years ago. You move on. But I’m very proud to have been a part of it.”

It left its mark on the city, too. Sohn stayed in Baltimore to build on The Wire’s outreach work and directed Baltimore Rising, an HBO documentary about tensions between police and activists after the killing of Freddie Gray in 2015. “I believe that, although hope dies every day on the streets of Baltimore, Chicago, Afghanistan or wherever, hope lives in these very same places,” she says.

What’s more, The Wire rewrote the rules of television drama with regard to tone, subject matter and narrative scope. The show that was once a tough sell is now both a benchmark of quality and a social document that is taught in universities. “When I saw the conversation that was initiated by The Wire, in all walks of life, it made me feel that people don’t want to be dumbed down,” says Peters. “They want something that’s going to challenge their intellect, make them feel alive, give them issues to debate. I didn’t see the whole series until about five years ago. I sat down and binged and said: ‘Oh my God, is that what I was a part of? Thank you, Lord.’”

Wendell Pierce and Michael Kenneth Williams in season four, seen by many as the show’s high point. Photograph: Allstar/HBO

“The Wire deals with every element of society, from the lowest of the low to the highest of the high,” says Faison. “Sometimes the ‘good’ people are not so good and sometimes the ‘bad’ people are striving to be good. It was something a great deal of people could identify with. We never pulled back. We met everything head on and dealt with the truth.”

That fundamental truth, which explains why The Wire illuminates the era of Trump and Black Lives Matter just as it spoke to Hurricane Katrina and the financial crisis, was best summed up by Simon in a 2007 interview with Nick Hornby. “This is part of the country you have made,” he said. “This, too, is who we are and what we have built. Think again, motherfuckers.”