In the first episode of Star Trek: The Next Generation, which aired 29 years ago today, a member of an all-powerful group of superbeings put the entire human race on trial, and changed the face of human history forever.

In “Encounter at Farpoint,” TNG’s first episode, the maiden voyage of the USS Enterprise went awry when Starfleet’s next generation encountered “The Q Continuum,” a group of beings whose intellect and powers far exceeded our own. One of their members, “Q,” held up a mirror to the fledgling crew’s aspirations to explore the universe, and what they saw wasn’t pretty. As far as Star Trek stuff is concerned, Q’s sudden appearance changed the way its entire fictional universe functioned. Q’s main assertion was that humanity had traveled far enough in space and polluted the galaxy with plenty of mixed messages and brutality. And so, he put the entire human race on trial for crimes against…well…humanity.

CBS/Paramount

Metaphorically, Q’s assertions that human beings were dangerous mirrored a lot of Star Trek’s relationship with the rest of science fiction. Overall, Star Trek’s optimism about humans in the future made it somewhat unique, and Q’s presence served as a narrative test for that optimism. Could the United Federation of Planets continue to prove it was still all that?

In 1987, Star Trek: The Next Generation basically posed that question and continued to explore it for seven more seasons. Even in its final episode, “All Good Things…,” Q reappears and taunts Captain Picard, reminding him that “the trial never ends.”

From the perspective of figuring out how this fictional universe works, Q’s introduction changed fundamental assumptions about the “truth” of Star Trek’s reality. In short: Q became the “god” of all Star Trek, and he wasn’t the benevolent kind. Q wasn’t a vengeful, evil god either though but more like the final answer in terms of Star Trek’s mission of seeking out new life forms. Essentially, Star Trek: The Next Generation started out with the most powerful alien ever in its very first episode, and then had to figure out how to raise the stakes after that. Because the conflicts on Star Trek generally have less to do with killing-the-bad-guy and more to do with banishing-the-bad-guy-who-lives-inside-you, Q’s introduction was deft and totally brilliant. With “Encounter at Farpoint,” Star Trek said, “It turns out God is real but he’s giant asshole, so, it’s best you just worry about yourself.”

Q would continue appearing throughout the Star Trek universe after The Next Generation went off the air, most prominently on Star Trek: Voyager. While space gods like Thanos in the MCU or the Time Lords on Doctor Who can create continuity headaches, the flippancy and omnipotence of Q actually helped to explain the overall weirdness of Star Trek’s galaxy rather than confuse it.

Star Trek’s bright optimism always needed an amoral and powerful nihilistic opponent. And when Q materialized in “Encounter at Farpoint,” Star Trek’s philosophical conversations started to become more balanced, more real, and way more fun.