It's an early January afternoon, and the cast of Community has gathered on the show's cafeteria set to meet the woman who saved Greendale Community College.

This is the first time that Kathy Savitt, chief marketing officer and head of media at Yahoo, is sitting down with star Joel McHale and Co., and she has a lot to share. Savitt details Yahoo's plans for the show: Community trailers in movie theaters, a pricey Emmy campaign, a premiere party at Austin's South by Southwest festival, an active presence on Tumblr (the blogging platform that Yahoo owns), and more.

Ten minutes into her spiel, Savitt realizes she's not getting much of a reaction. She pauses. She's thinking, Does that all sound OK?

Ken Jeong, who plays eccentric student/school employee Ben Chang, finally pipes up: "No one's ever talked to us this way!"

A few weeks later, back on set, Jeong says he's still stunned by the show's reversal of fortune. "I'm not used to the kind of love we're getting this year," he says. "It's been so surreal and sublime to be in a position where we all saw the ax coming, and then a few months later to be able to tell Kathy, 'We want this.'"

One of the most unconventional series ever to hit primetime, Community always struggled for acceptance at NBC, where it debuted in 2009. Initially pitched as a comedy about strangers who bond in a community-college study group, the show quickly became an experiment in deconstructing the sitcom form. Created by iconoclast Dan Harmon, Community earned critical acclaim and a loyal (if small) fan base by parodying TV tropes and making meta jokes about pop culture.

Trae Patton/Yahoo/Sony Pictures Television

Viewers fell in love with the show's quirky characters, but by Season 3, executives from NBC and Sony Pictures Television, the studio behind the show, felt it wasn't commercial enough to garner mainstream success and had grown tired of clashing with Harmon. Harmon was fired, and new executive producers were brought in.

Ironically, the new showrunners essentially tried to emulate Harmon's Community blueprint, and the show failed to broaden its base. McHale lobbied hard to bring back Harmon and fellow executive producer Chris McKenna, and in an extraordinary move, the two were rehired. But by the end of Season 5, it was clear that NBC had had enough of Community's shenanigans. Even though the show averaged a 1.5 rating among adults 18-49, a decent number nowadays, the network was ready to cut it loose. "If you look at our ratings, they were pretty darn good," McHale says. "But it was always, 'Well, you'd be lucky to get picked up.' We were [in flux] until they eventually canceled us. That was a great day. Fun day. That's sarcasm, folks."

Alison Brie, who plays bright-eyed student Annie Edison, says it was tough to schedule her career around a show that was forever on the bubble, unclear whether it'd be renewed or canceled. "It sucks," she says. "Every year we would be on hiatus, it was stressful trying to do other work. But the show always came back."

Until it didn't. After NBC canceled Community last May, Sony attempted to set it up at Crackle (the streaming site it owns) or Hulu (which holds the series' syndication rights). Neither deal worked out, and it looked as though the doors to Community might get locked for good. "We all moved on," says McHale, whose Jeff Winger, a lawyer turned student, led the charge to save Greendale last season when Subway tried to turn it into a university devoted to sandwich making. "There was a long period between cancellation and Yahoo buying it. We all started conversations with other networks [about other shows]. It's not like my kid's finger got chopped off or someone died. But artistically, it was a real bummer."

Gillian Jacobs, who plays misinformed psychology major Britta Perry, says she was told by many that the show was dead and never coming back. "I started to move on," she says, "because otherwise you're just a Miss Havisham character, holding on."

To mark the end, the cast gathered last June at a Los Angeles restaurant for a goodbye meal. "We had planned the dinner and thought, 'It's either going to be a celebration or a wake,'" McHale says. Danny Pudi, who plays the socially awkward Abed Nadir, says the gathering ended up being a bit mournful: "We all got drunk, cried a little bit, laughed a lot."

But Sony Pictures Television doesn't give up easily. The company recently resurrected Unforgettable at A&E after the show had been dropped by CBS–just the latest in a long line of programs it has revived elsewhere. "People perceive there's so much animosity between Dan Harmon and us," studio president Steve Mosko says. "Sometimes business is like sports, where there's a lot of back and forth. But one thing we all have in common is we want the show to continue. How we get there is sometimes a little bumpy, but that's the way it works."

Harmon says he's figured out how to work with the studio and was thrilled that, in an email leaked during the recent Sony hacking case, someone at the company praised the show. "Sony is a gigantic corporation that is good at certain things that others are not–like keeping shows alive," he says. "Even when deep down they loathe the people who created the shows, they pump it with formaldehyde; they defibrillate it."

Justin Lubin/Yahoo/Sony Pictures Television

But Harmon had also made peace with NBC's decision. He was ready to return if Hulu was attached ("They bought my house," he says, alluding to the syndication dollars), but he was skeptical of Yahoo's interest. "I immediately said, 'No way, that's ridiculous,'" he says. "I had never heard the word Yahoo in association with television before." His opinion changed when Savitt called and he couldn't detect a hidden agenda. "There was no way I could say no to this person," he says. "I would have spent the rest of my life wondering, 'What if I had joined forces with her?' She might have a moon colony at some point. If I do a good enough show, maybe we get extra oxygen."

For Yahoo, Community is the first offering in a new slate of original programming: Bridesmaids director Paul Feig is behind Other Space, a comedy about misfit space travelers, while Smallville's Mike Tollin is executive producing Sin City Saints, a comedy about a Las Vegas basketball team. The plan is part of a larger strategy for its free Yahoo Screen streaming service. The company, which produces video content for its digital magazines covering food, finance, travel, and other topics, also has a deal with Live Nation to air live concerts every day. "Community is a great opportunity for viewers who come for one show to sample our others," Savitt says. Season 6 launches on March 17 with two episodes; additional installments will be rolled out one per week. Yahoo's deal for a 13-episode season will even allow for shows longer than the broadcast-standard 21 1/2 minutes. "They can breathe a bit," McHale says.

The pact was signed just hours before the stars' contractual obligations were set to expire. "I was kept in the loop by Sony, but that's because I would badger them," McHale says. "We were all asked, 'If this thing happened, do you guys want to do it?'" Once Harmon was on board, he had to convince his fellow executive producer to return. "It was time to move on," McKenna says of the cancellation. "I told Dan I have a newborn, I just got hired to write a feature, and Universal wants me to develop a pilot. But Dan promised to be my Lamaze coach. It's all I needed to hear."

Savitt is making good on her promises so far. McHale marvels at the attention, which includes Community's first large-scale promo shoot since its debut season. "We knew it was different right then," he says, "because they were already spending money, and they were giddy."

The cast members agree they won't miss waking up on Friday mornings to see the ratings. Like Netflix and Amazon, Yahoo has no plans to reveal how many people are watching–at least initially. "You may find that we had more viewers than previously counted, because I think the Nielsen system is heavily stacked against a show like Community," Jacobs says. "Kids watching us in their dorm rooms at 2am may now for the first time be counted." McHale's expectations are a tad higher: "I think it's going to be [streamed], like, a billion times."

The freedom Yahoo offers may be too much for Harmon and McKenna. Without NBC's standards and practices deciding what's appropriate, the showrunners are policing themselves to make sure themes don't become too adult. As for language, Harmon admits to "loosening the corset." Some network-banned words will now make it onto Community, including Jesus as an exclamation. "I always found it odd that people couldn't utter that word," Harmon says. "It's so primal and not profane."

Community didn't just move to Yahoo. It physically relocated to the San Fernando Valley after NBC's Marry Me took over its space at the Paramount lot in Hollywood. The show's new facilities, in a former parking garage at the CBS Studio Center, are much larger than the old digs, which has allowed the producers to build additional sets, including a pub. But it's been hard on the actors, who have had to learn a different Greendale floor plan. "Just a week ago, I realized there was a much quicker path to Annie and Abed's apartment," Brie says. "Danny still gets lost every day. He has to have someone holding his hand to bring him to set."

Community's space is so big, Harmon has started tooling around on a Segway. "What surprises you anymore?" Pudi says, laughing. "Dan Harmon rides the Segway around the cafeteria, because he can!"

The show is also stretching beyond the stage, filming more outdoors–including a trip back to Los Angeles City College, where the pilot was filmed. "We've seen natural light for the first time in four years," Brie says. "We can go shoot on a street that looks like a street!"

For viewers, the departure of two cast members (following Chevy Chase and Donald Glover's earlier exits) may be Season 6's most jarring change: Yvette Nicole Brown (sweet Shirley Bennett, the show's moral center) left to care for her ailing father and has gone on to The Odd Couple, and Jonathan Banks (crusty professor Buzz Hickey) joined Better Call Saul.

Justin Lubin/Yahoo/Sony Pictures Television

Paget Brewster and Keith David are two of Season 6's new additions. Brewster (who guest starred as a different character last season) plays Frankie Dart, a problem solver who shows up in the premiere to put Greendale's finances in order. "She might be a metaphor for Yahoo," Harmon admits, "in the sense that she's an unprecedentedly professional presence in this asylum."

But Frankie's plans don't sit well with some of the gang. "I start cutting things that the students and Jeff want to keep, and it upsets Jeff," Brewster says. "They discover that, without Shirley, there's a lack of a voice of reason. They're crazed animals. Frankie's good at what she does but ends up having to be a jerk to do her job."

David is introduced in the second episode as Elroy Patashnik, a washed-up inventor who comes to Greendale in search of redemption. "I'm the guy who did all the wonderful ideas that didn't pan out," David says. "I feel I understand something about being a dinosaur."

Jim Rash (flamboyant Dean Craig Pelton) and Nat Faxon directed the episode, which also finds the dean stuck in one of Elroy's virtual-reality contraptions. "That was nerve-racking," Rash says of his first time helming a Community episode. "Even though you're in a very safe environment, it's still Dan's words and the writers' vision. The actors couldn't have been nicer–although," he adds with a laugh, "Joel is a little hard to direct."

It's a rare rainy February afternoon in Los Angeles, which fits the mood inside the Community writers' room. The staff is struggling to map out a story about Chang leaving Greendale behind after becoming a minor national celebrity. Abed had been making a film featuring Chang, and after realizing they can use that footage to capitalize on his fame, the other study-group members conjure up a plan to turn the footage into a new movie, leading Abed to lose control of the project. But the writers can't figure out what's motivating Abed to play along.

Harmon pitches idea after idea. Just like Abed, who traffics in pop-culture minutiae, he peppers every example with a reference, citing, in the course of an hour, Ed Wood, Brewster's Millions, Bob and Doug McKenzie, Major League, Rocky Balboa running up the steps in Philadelphia, and Fonzie. "Breaking stories gets harder each year," he says, noting the difficulty in keeping characters "this familiar going through experiences that challenge them every week." He decides to sleep on it and cracks the idea the next day. The episode is probably the most ambitious in a season that is mostly back to basics. "We have been doing a season that is very much a sitcom set in a community college," Harmon says. "It's character-driven."

On set a week later, it's clear the episode is also a comment on Community itself, as Abed and Jeff candidly discuss their fear of being left standing alone as everyone around them departs. "Jeff is in a crisis this year," McHale says. "He's got some big questions about this school and losing people in this life. He's brought these people in, and now what is going to happen? He's dealing with how he's opened his heart, and he might experience loss."

Adam Taylor/Yahoo/Sony Pictures Television

This season's guest stars will include Steve Guttenberg and Billy Zane, and some familiar faces may even be back. Harmon is coy when asked about Chase's claim that he was invited to make an appearance as the (now deceased) curmudgeon Pierce Hawthorne: "All I'll say is, if Chevy was approached about doing a cameo for Season 6 and he did spill it on Reddit, then he deserves everyone accusing him of being insane." The possible return of Glover (who played jock Troy Barnes and left to pursue a music career) is a more sensitive subject. "That's too painful," Harmon says. "I just want him to come back. I'll talk to him on the phone about life and stuff, but I don't want to be the guy he stops calling, so I don't push it."

At this point, after the ups and downs, the producers and stars joke that the show will never leave them–they will have to leave Community. But the actors' six-year deals are up after this year, and if there's a seventh season, it's likely that several more of them will depart. Among the busy troupe, Jacobs is starring in Judd Apatow's Netflix series Love; Jeong has the semiautobiographical comedy pilot Dr. Ken set up at ABC; Pudi will return to NBC for the horror-comedy pilot Strange Calls; and Rash, who won an Oscar with Faxon in 2012 for the script of The Descendants, is writing and directing more features.

Harmon has two ways of looking at it. "One," he says, "is we have been pared down to the absolute minimum. If Alison is unavailable for an extra hour a week, our show deflates like a balloon. The other way is the show itself is about people in transition. Is there such a thing as a bad version of Community if the entire cast leaves and we audition new people and do some strange Law & Order spinoff using the same sets and sensibility?"

Adam Taylor/Yahoo/Sony Pictures Television

Hopefully, fans won't have to find out. McHale, who still hosts the weekly pop-culture clip show The Soup on E! and is developing shows, says he's game to continue. "We are a fungus that is very hard to remove," he says. Jeong agrees: "I can't quit the show. I still have more to learn, more to evolve. If all I had to do was Community for the rest of my life, that would be heavenly."

That will be up to Yahoo. "We will be transparent with our advertising partners and share numbers at some point," Savitt says. Yahoo will also look at how Community performs in social media and whether it drives users to other Yahoo content.

If Community does go on, Harmon says he won't ever be able to leave: "After being the guy who wasn't supposed to have a show, the guy whose show was supposed to be canceled, the guy who got fired from his own show, and then the guy who got rehired, I'm the only thing that can go wrong. I can't be a rebel anymore. I'm going to be the last one here."

MORE COMMUNITY:

The Inside Scoop on Community's Long Road to Yahoo (and What It Means for Season 6)

Q&A: Exec Producers Dan Harmon and Chris McKenna Discuss Season 6 and the Show's Ultimate Fate

Q&A: Ken Jeong on Ben Chang's Next Adventure and Why He'll Never Leave the Show

Q&A: Alison Brie on Weathering Cancellation and Resurrection, and What's Ahead for Annie

Community's Writers Share Their Most Memorable Scenes

Community Selfies: On Set With Joel McHale (PHOTOS)

How to Watch Community on Yahoo

Community Season 6 Trailer Released

Video: Joel McHale on Season 6 and playing Either/Or