The 2000s ushered in a new golden age of television, with HBO’s The Sopranos (1999-2007) representing a literary ambition rarely seen in drama and NBC’s The Office (2005-2013) putting a new spin on the workplace comedy.

Both are now considered modern classics. And both could have starred James Gandolfini.

On a recent episode of the Talking Sopranos podcast, former cast members and co-hosts Steve Schirripa and Michael Imperioli told guest (and co-creator of the original The Office) Ricky Gervais that Gandolfini had been approached to join the American adaptation of The Office, presumably as the new head of Dunder Mifflin following the departure of Steve Carell in 2011. Schirripa said NBC had made Gandolfini an offer of $4 million to do one season of the show.

In The Office: The Untold Story of the Greatest Sitcom of the 2000s: An Oral History by author Andy Greene (2020), Office producer Daniel Chun discussed Gandolfini’s potential casting.

“I remember him being really, really complimentary, but he wasn’t super familiar with the show,” Chun told Greene. “He had watched a few episodes and was really unsure about comedy. He was like, ‘I don’t 100 percent know how to play this.’”

The book describes the Gandolfini deal as being “very close” to happening, though ultimately James Spader was cast in the series.

“I don’t think that we stopped talking to him,” producer Teri Weinberg said. “I mean, that conversation went on for some time but he had other shows that he was developing for himself and that was just part of what his focus was, so I don’t think he was necessarily ready to just jump into this role.”

That’s apparently when HBO intervened, paying Gandolfini $3 million to keep him in the HBO fold.

While Gervais joked it was to keep the legacy of The Sopranos “pure,” the most likely explanation is that the cable channel didn’t want to have Gandolfini tied up on a show and wanted to keep him available for their own projects. Sweetening a production deal was probably hastened by word that Gandolfini was considering a role elsewhere.

Whatever their agreement, Gandolfini settled back into HBO, where his Attaboy Productions had been developing possible projects for the actor dating back to The Sopranos. In 2012, the network ordered a pilot for Criminal Justice, an adaptation of a BBC series that was set to star Gandolfini as a lawyer representing a young man accused of murdering a woman he had met at a party. Gandolfini passed away in 2013 after shooting the pilot, which was reworked with John Turturro in the lead role and was retitled The Night Of (2016).

Strangely, Gandolfini was also working on a project with Steve Carell. The two were looking to appear in Bone Wars, a comedy about real-life paleontologists and professional rivals Edward Drinker Cope and Nathaniel Charles Marsh. Gandolfini and Carell also appeared together in 2013’s The Incredible Burt Wonderstone.

[h/t The A.V. Club]