RIC FRANCIS/Associated Press

A decade ago, HBO's celebrated The Wire departed with a lasting montage of Baltimore's skyline as cars scooted along the highway. The groundbreaking series dramatized serious topics like the failure of the war on drugs and the decay of the industrial workforce while introducing its audiences to three-dimensional characters such as Stringer Bell (Idris Elba) and Omar Little (Michael K. Williams).

It was also a show that occasionally mirrored the competitive culture of sports. Characters like Avon Barksdale (Wood Harris) possessed power and struggled and schemed to maintain it. Those without influence yearned to have it. One of the show's most lasting quotes is a sports metaphor. The inaugural season concludes when Omar wields a gun while robbing a drug dealer. Laughing and grinning ear to ear, he declares: "All in the game, yo. All in the game."

The topic of sports came up somewhat frequently while researching my recently published oral history, All the Pieces Matter: The Inside Story of The Wire. Off the screen, pickup basketball games took place when the cameras weren't rolling. The then-teenagers who played the Season 4 corner boys—Maestro Harrell (Randy Wagstaff), Julito McCullum (Namond Brice), Jermaine Crawford (Dukie Weems) and Tristan Wilds (Michael Lee)—often had to shuffle between class and studying their scripts on set. During down time, they balled.

Harrell, whose character had the megawatt smile that quickly dimmed, recalled one game in which they played Gbenga Akinnagbe (Chris Partlow) and Jamie Hector (Marlo Stanfield). As it turns out, the younger legs of the teenagers didn't help them that day. The reason? Andre Royo, the veteran actor who played the drug fiend Bubbles, was a monster on the court. Harrell couldn't get a shot off.

Randy Shropshire/Getty Images

Royo was a particularly blanketing force on the perimeter, in the vein of Kawhi Leonard. "Andre Royo shut me the hell down," Harrell said with a laugh. "I couldn't move. I couldn't do anything. His defense was on a 1,000." Harrell spoke of the games fondly. There was an air of purity, like in a schoolyard game. "It was so much fun because we all were out making an ass of ourselves, but having a great time," he said.

Wilds remembered things similarly. "Listen, Andre Royo is an animal. … An animal on the court," he said. "We've had some games. Now me, I'm not a basketball player. You won't hear many stories about Mack Wilds playing basketball. But I was always there."

It didn't take many episodes for hoops to appear as a plot device. David Simon, the show's main architect, saw the ninth episode of the debut season, "Game Day," as a clever mechanism to explicate the love affair between urban America and basketball. It was impossible to ignore the game, he told Kelley L. Carter of The Undefeated. "You'd have to be willfully ignorant." "Game Day" centered around an Eastside versus Westside basketball game in which opposing factions put aside beefs to play for bragging rights. Wardrobe choices became a barometer for self-worth and street savvy. "How come you wearing that suit, B?" Avon Barksdale asks Proposition Joe. "For real, it's 85 f--king degrees and you trying to be like Pat Riley."

"Man, look the part, be the part, motherf--ker," Joe replies.

Simon shot hoops from time to time. Rafael Alvarez, who joined The Wire as a staff writer in the second season and grew close to Simon at the Baltimore Sun, remembered the games from those early days.

"[We] would get off the midnight shift and go play basketball with some other people in the newsroom, because I had keys to a local church. … It's almost like being rookies on the same ball club," Alvarez said.

Other sports found a way into the show's storyline in subsequent seasons. During Season 3, Chad Coleman's Dennis "Cutty" Wise, a veteran drug soldier weary of the game, ends up leaving it behind to teach kids boxing. Like nearly every significant storyline in The Wire, Wise's personal progression is sourced from real life.

"Calvin Ford is the real dude that has a boxing gym … who a lot of this character is based off of," Coleman said. "They took me over to meet him. We became really good friends. He's there in the hood with these boys going through everything that Cutty went through for real."

Simon peppered his favorite sport, baseball, throughout the show's five-season arc. In one scene, the two detectives, Jimmy McNulty (Dominic West) and Bunk Moreland (Wendell Pierce) attend an Orioles game. In another, Tommy Carcetti (Aiden Gillen), a local politician, complains about the Orioles pitching staff. Scott Templeton (Tom McCarthy), a young, ambitious reporter at the Baltimore Sun, is assigned to report a piece outside of the Orioles' opening day.

But it didn't stop there. Little-known athletes from the real world were also written into the script to add texture—and a dose of realism—to the sports depicted on the show. It's doubtful many recalled the impact Gus Triandos held in baseball before The Wire. He was a Greek American who played first base and catcher for a number of teams in the 50s and 60s. One of those was the Orioles, and the writers used that as source material for a bit of dialogue called "Who would you do?"—a lewd and slightly absurd game in which participants throw out names of people—often celebrities—who would make for undesirable sexual partners.

"I really enjoyed writing that conversation, 'Who would you do?'" said Richard Price, one of the many novelists who wrote on the show. "In exchange for getting the Olsen twins, I came up with Gus Triandos."

Reed Saxon/Associated Press

Such a miniscule detail wasn't far from Simon's wheelhouse. He was a fantasy baseball fanatic and even played with writers from the show. "I did play with him one year, and he is—it's all-consuming for him," said Shamit Choksey, one of the co-writers of "Game Day." "He's a maniac when it comes to fantasy baseball. I think that after that year, I decided I'm never going to play fantasy baseball again."

Sports is ripe for metaphor, and in talking to hundreds of people involved with the show, many of the interview subjects often drew parallels between sports and their own hurdles. After Seth Gilliam, who played Sgt. Ellis Carver, grew frustrated over a lack of scenes in the show's second season, he and another member of the cast, Domenick Lombardozzi (Thomas "Herc" Hauk), approached Simon with their grievance.

"At one point, I had made the analogy that you're like one of those baseball players that plays against the Yankees and just confidently destroys the Yankees, so they sign you into a massive contract and then you wind up sitting on the bench," Gilliam said. "You know, not playing, but you can't hurt me anymore. It's like, what am I doing here? You know, I want to hit."

In my interviews, perhaps no one was more eloquent than Ed Burns—the man who produced, wrote, and co-created the show. He explained the power structures of the drug game—the relationships between the leaders and followers—that made the show so compelling.

"Let's say you're graduating 10,000 kids from high school, five or six of them will turn out to be major drug dealers, that's it," Burns used as an example. "If you graduate 10,000, let's say, 5,000-6,000 try their hand at the corner and a lot of them are immediately turned away. They just can't handle it. The numbers dwindle down. It's like the NBA or baseball or anything."

He continued: "As you go up the pinnacle, it gets smaller and smaller. When you get to that, toward the top, you're down to three, four and five guys that are the big guys and all the rest are cannon fodder."

And the king stays the king.

Jonathan Abrams is a senior writer for B/R Mag. A former staff writer at Grantland and sports reporter at the New York Times and the Los Angeles Times, Abrams is also the best-selling author of All the Pieces Matter: The Inside Story of The Wire—available right here, right now. Follow him on Twitter: @jpdabrams.