That the low-rated "Community" is returning to NBC on Thursday night at 8, for a fifth season, with creator Dan Harmon back at the helm a year after he was fired, defies all logic. But then, "Community" has never had much use for logic. The comedy — and the dysfunctional community college that provides its setting — has always operated by its own set of rules, consistently pulling off ideas that have no business working. At its best — and Harmon's first few episodes back get much closer to the show's peak than I was expecting — it is a marvelous contraption fueled equally by a love of pop culture and a commitment to character, that can do kitchen-sink realism one week and a stop-motion animated Christmas adventure the next.

The unpredictability and strangness that made "Community" such a pleasure also kept it from being a hit. You were either on its wavelength or you weren't — even among the show's small but rabid fanbase, there's a deep schism between those who love the high-concept episodes where the study group become Wild West gunslingers or astronauts, and those who prefer more straightforward college hijinks — and the third season under Harmon only got weirder and more insular as it went along. So Sony executives, somehow convinced that a mass audience could randomly turn up after all this time, parted ways with Harmon(*) at the end of that season, hoping that replacements Moses Port and David Guarascio might be able to make a more broadly appealing version of the same show.

(*) Harmon was not, however, let go because of his very public feud with star Chevy Chase.  Harmon returning shortly after Chase quit is coincidental, and primarily a reflection of Chase's own long-established difficulty playing well with others.

It was a no-win scenario for the new guys. They could either try to reinvent the show and risk chasing off the Harmon devotees without guarantee others would replace them, or they could try in vain to copy Harmon's idiosyncratic voice. They chose the latter, and the results were about what you would expect: lots of episodes that looked and sounded like "Community," but that were missing the crazy spark, and the strong characterization present even in the episodes about parallel universes or "My Dinner With Andre," that made the Harmon version of the show so special. Other than a "Freaky Friday" riff penned by co-star (and Oscar-winning screenwriter) Jim Rash, and perhaps the one where the study group was transformed into singing puppets, the episodes were forgettable, and a few so bad they made one wish the show had been canceled rather than kept around in zombie form.

The current NBC administration had been trying to unburden itself of "Community" since it took power, and as ratings dipped even lower and many critics and fans turned on the show, this seemed an easy opportunity to do so. Instead, they renewed "Community" and, even more startlingly, Sony brought back Harmon, finally recognizing that there's no point in making this particular show without that man in charge of it.

Now, TV creators have left of their own accord before and returned later in the run. This appears to be the first time one was fired and then rehired, but even in the voluntary cases, you rarely see shows return to their earlier creative levels. And there had been some bumps towards the end of Harmon's run. There was no guarantee his return (and that of his lieutenant Chris McKenna) would fix the many things ailing "Community" and put all the unstable elements back in balance with each other.

But it works — at times beautifully. Harmon and McKenna have to spend a lot of the season's first episode dealing with the choices made by Port and Guarascio season, plus some of their own from season 3, but by the end of the second installment (which is airing back-to-back with the premiere), "Community" feels like "Community" again — or as much as a chameleon of a sitcom like this can.

The Harmon-less season isn't waved away as a dream, or another alternate timeline dreamed up by Abed (Danny Pudi), so the premiere has to get Jeff (Joel McHale) back to Greendale after his graduation, revisit the matter of Chang (Ken Jeong) faking amnesia, as well as explain why Chase's Pierce won't be around anymore. (They also have to begin laying the groundwork for Donald Glover's Troy to exit after the first five episodes.) It's fairly dark at times, even with the usual meta and pop cultural references (the ninth season of "Scrubs" is discussed far more here than it has been any place outside of Dave Franco's house in the last three years), and it goes a long way toward Harmon's stated goal from this summer to bring the characters back to their emotional basics.

Midway through the episode, Jeff notes that his friends arrived at one end of Greendale "as real people and came out the other end as mixed-up cartoons." Without taking away what's funny about the individual study group members, Harmon manages to turn them into recognizable human beings again. Thursday's delightful second episode is the most grounded and strongest Alison Brie's Annie has been in forever, and the fourth episode(**) again proves just how much comic and emotional value there is in placing these characters in one room together to see what happens.

(**) Due to actor availability, some episodes were filmed out of order; critics have seen the season's first, second and fourth installments.

Chase is more or less succeeded by "Breaking Bad" alum Jonathan Banks, who plays criminology professor Buzz Hickey, a tough guy who enjoys the power he holds over his students. Banks has excellent comic chops, and it's one of those smart character swaps — like Frank Burns for Charles Emerson Winchester on "M*A*S*H" or Diane for Rebecca on "Cheers" — where the newcomer occupies the same basic space as their predecessor (in this case, older guy who agitates the study group and tries to mentor Jeff) while being different in almost every other way.

Though there's still a lot of pop culture talk (Abed spends the second episode studying the career of Nicolas Cage), in the early going Harmon avoids the high-concept episodes that came to define his first run. Aliens do not invade Greendale. Troy and Abed don't consciously re-enact the plot of the "Bosom Buddies" pilot. The evil study group from the parallel universe does not reappear. It's still a universe with its own strange rules and stranger characters, though even some of them are pulled a few hairs closer to reality. (The premiere, for instance, looks at some of the harsh truths Rash's chipper, pan-sexual Dean Pelton has to face while running Greendale.) And if and when more fantastical things happen later in the season — or, perish the thought, if we get one step closer to the dream of Six Seasons and a Movie — they'll take place on a much stronger, more satisfying foundation.

Other than the systemic travails of NBC, I have no idea how "Community" is still on television. I have even less idea of how Harmon is back in charge of it. But the whys of it are much less important than the wonderful, hilarious, poignant fact itself. "Community" is back, and back to being itself.

As with so many things that happen at Greendale, it's best not to spend too much time thinking about the reasons behind it. Just enjoy that it's happening, and that it's so much damn fun.

Alan Sepinwall may be reached at sepinwall@hitfix.com