Jenna Fischer, John Krasinski

Bob Odenkirk as Michael Scott? An African-American Pam Beesly? A spinoff starring Ed Helms as suburban dad Andy Bernard? Those were just some of the possibilities considered as the hit British comedy The Office was adapted for American audiences.

Executive producer Ben Silverman first caught the show, a mockumentary chronicling a mundane workplace and its incompetent boss, on BBC2 during a trip to London. "I found it so blindingly hysterical and awkward," he says, "that I immediately went to pursue the rights." Creators Ricky Gervais and Stephen Merchant met with a panoply of producers, but Silverman was set on King of the Hill cocreator Greg Daniels: "I thought he was so brilliant in developing working-class characters."

Daniels — who had been meeting with The Jim Henson Company about a new Muppet Show — agreed to sit down with Gervais and Merchant. "I stayed up all night watching Season 1 of the British Office," he says. "I wanted to meet Stephen and Ricky, mostly to find out how they did it. It turns out their favorite Simpsons episode was one that I had written, "Homer Bad Man." We talked about The Office and what to do with it."

Nonetheless, Daniels was hesitant. "It took me a long time to agree to do it because I'm a cautious person," he says. Once on board, Daniels was meticulous in crafting a version that both honored the original but was tailored for the U.S.

The show narrowly made it on the air: "It's one of the worst-testing pilots ever, alongside Seinfeld," notes star Rainn Wilson (Dwight). Despite the odds stacked against it, The Office cheated cancellation and went on to become a nine-season sensation.

With the comedy ending its run on May 16, the cast and producers shared some of the lesser-known secrets behind what it took to build and maintain Dunder Mifflin's Scranton office.

The Office was originally developed with FX or HBO in mind.

At FX, then-entertainment president Kevin Reilly took a strong interest in Daniels' adaptation. But when BBC America began running the U.K series, Daniels feared that on cable, his take would be overshadowed by the original. "I thought, 'Oh crap, we're going to be comparing the two versions here.' Very few people watched the British show in America, but everyone whose opinions I respected and trusted watched it. It forced us to rethink where we were selling it." When Reilly moved to NBC, he still wanted to buy it. "I said it didn't feel like an NBC show," Daniels says. "At the time, Will & Grace was their number-one show... I was kind of daring them to do the original British show." For the pilot, Daniels stuck closely to the U.K. Office's first episode in order to avoid any network notes.

Steve Carell almost missed out on becoming Michael Scott.

Then-Universal Pictures chairman Stacey Snider first suggested Carell to the producers. But Carell took a job on the NBC sitcom Come to Papa. Daniels also looked at Bob Odenkirk (Breaking Bad), David Koechner (who later played traveling salesman Todd Packer), Alan Tudyk (Suburgatory) and even Wilson, who was obviously more suited for Dwight. But Come to Papa quickly flopped, and NBC let Carell test for Michael Scott. "He nailed it," says Silverman. "The rest is history."

Jim and Pam might have been an interracial love story.

"Jenna [Fischer] was the perfect Pam," Daniels says. "The only alternative to Jenna: I had a version in mind in which Pam was African American and so was [her boyfriend] Roy. It would have been Craig Robinson as Roy and Erica Vittina Phillips as Pam. I was flirting with that as part of Americanizing it." Among other possible castings, Eric Stonestreet would have been Kevin if Brian Baumgartner hadn't been picked; Parks and Recreation star Adam Scott tested as Jim; and Mary Lynn Rajskub (24) auditioned as Pam.

Dunder Mifflin branches exist all over the Northeast.

When Jim (John Krasinski) moved to the Stamford branch of Dunder Mifflin at the start of Season 3, Daniels came up with a list of the paper company's other offices. "There was a Nashua branch and a Yonkers branch," he says. "We picked a whole bunch of Scranton-sized cities in the Northeast that had slightly humorous names."

The original Office spinoff idea: A parody of PBS' An American Family.

"We were going to do a mockumentary version of the Loud family, with Helms' Andy as the dad and Catherine Tate [who later joined The Office as Nellie Bertram] as the mom, living in a cul-de-sac somewhere in America. But in the intervening year, Modern Family came out," says Daniels. "And they did it." Among the other ideas considered but discarded: A Jim and Pam family show; Dwight on the beet farm (which eventually was attempted this year as the backdoor pilot The Farm, before NBC nixed it); Darryl (Robinson) headlining his own show; or even just another Dunder Mifflin branch. "The problem was you didn't want to do anything that hurt the mother ship," says then-executive producer Michael Schur. "In Season 4 you couldn't take Jim and Pam from The Office."

How Parks and Recreation could have been an Office spinoff.

Casting Rashida Jones in a different role than her Office character Karen kept Parks and Rec from being a spinoff. But executive producer Paul Lieberstein did have a unique way to do it: On The Office, a copy machine breaks and throughout the episode a repairman tries to fix it. At the end of the episode, the machine is loaded on a truck and refurbished in a warehouse. Then the copier is loaded onto another truck and taken to Pawnee, Indiana, where it's dropped off in the Parks and Recreation office. In a twist on "spinoff" tradition, the character spun off would have been the copy machine. Producers briefly considered the idea, but ultimately Parks and Rec was its own creation.

Oscar (Oscar Nunez) wasn't supposed to be gay.

"But wardrobe put him in a pink shirt at one point," says Daniels. The writers had been working on a storyline in which Michael was trying to figure out who in the office might be gay — and that shirt led to Oscar's big reveal in the Season 3 episode "Gay Witch Hunt." Says Daniels: "A lot of our stories were trying to figure out what would be hugely inappropriate for a boss to do."

Dwight's backstory was inspired by Wilson's family, Daniels' grandparents and UPN's Amish in the City.

"I brought to the writers a bunch of pictures of my family, a very eclectic and trailer park-y bunch," Wilson says. "That gave them the idea that Dwight's background might be more rural or white trash. It was introduced in Season 2 that Dwight owned a beet farm. That was based on Greg's grandparents, who used to raise beets back in Poland before the war." As for Dwight's cousin Mose, "I had been really into this reality show Amish in the City and talked about how goofy it was in the writers' room," Schur says. "So Greg made me play Mose." Schur donates all of the acting money he makes from playing Mose to charity. "The whole thing was so absurd I felt I couldn't keep the money," he says.

Fischer regularly hears from viewers who don't like stronger-willed Pam.

"A lot of people turned on Pam when she became more assertive," Fischer says. "That always made me sad. I'm so proud of her that she found her voice. But there are some people, particularly men, who are far more attracted to her as a wallflower. I think that's so telling in what they're looking for in a woman."

Had NBC ordered The Farm to series, Dwight would have left The Office in midseason.

"Part of the plan was that Rainn would leave halfway through the year," Daniels says. Had that happened, Tate's Nellie would have "stepped into those Dwight shoes," he adds. Cousin Mose would have become a traveling salesman, as Schur is busy executive producing Parks and Rec. "Mose would load up an ox cart with beets and go to roadside farms all over the state of Pennsylvania and be selling the Schrute family beets." And Fischer says she's certain that "at some point Jim and Pam would have visited."

Wilson says he believes "NBC made a big mistake in passing on The Farm. I think there is a ton of potential. But if it didn't get picked up, I knew it was time to let Dwight go, to hang up my glasses, mess up that hard center part in my hair and move on. That's what happened, and I'm over it."

Subscribe to TV Guide Magazine now!