Given the topic of this essay, this post contains spoilers for the following shows: Game of Thrones, M*A*S*H, All in the Family, House of Cards, The Good Wife, The Walking Dead, Dawson’s Creek, The West Wing, Grey’s Anatomy, Dexter, and Halt and Catch Fire. You have been warned.

For the first 42 minutes of “The Rains of Castamere,” the penultimate episode of Game of Thrones’ third season, the Starks appear to be scaling their high moral ground to victory. Robb and Catelyn put aside their disagreement over enemy hostages long enough to play a game of Westerosi Risk. Arya is closer than ever to a Hound-delivered reunion with her family. And Robb’s newly pregnant bride, Talisa, brainstorms names for her baby on the way. The underdog house that had long suffered at the hands of its morally corrupt opponents is finally on the up-and-up. At least, that’s exactly what the episode director David Nutter wanted you to think.

The 100 Best TV Episodes of the Century Check out The Ringer’s ranking of the best episodes since 2000

“I always found, in doing deaths you want to have a lightheartedness, you want to have the audience let their guard down a little bit,” Nutter told me. “Kind of like: ‘Oh we made it. It’s all going to be great. Everything’s going to be wonderful.’ And then, of course, you can surprise the audience when they least expect it.”

The deaths Nutter refers to, by most accounts of the 5.22 million people who watched Catelyn Stark’s throat get slit that night, were some of the most heart-wrenching and shocking losses in television history. Just two seasons after Ned Stark’s head was lobbed off, his wife, his heir, and his heir’s heir were slaughtered at what was supposed to be a low-key, strategic union. The Red Wedding was a viewing experience as emotional as it was performative. Fans expressed their sorrow in teary YouTube reaction videos and indignant tweetstorms. Smithsonian.com even attempted to make sense of the outpouring in an explainer titled “Why It’s Okay To Be So Upset Over Yesterday’s Game of Thrones.” “The emotional bonds we forge with fictional characters can be just as strong as the connection we feel with some people in the real world,” it read. “So when bad things happen, the emotional responses we have can be powerful.”

Showrunners have known that all along, but Game of Thrones may have been the first series brave enough to fully exploit it. “After three seasons of the show, the audience really became connected to the characters, and really truly emotionally invested in the show,” Nutter said, recalling an early conversation he’d had with show creators David Benioff and D.B. Weiss about the episode’s timing. “This was the perfect time to pull the rug up from under them, to let the audience know that this is not a safe world in any respect.”

Twenty years ago, it was unthinkable that any sitcom or series could do away with its main character, let alone his entire extended family, especially mid-run. The television of yore always depended on a magnetic personality to remain alive, and draw loyal fans and reliable ratings. There was no love without a Lucy, no vampire slayer without a Buffy, no Seinfeld without a Jerry. In the ’50s and ’60s, when supporting actors needed to leave a show, they were sent off to college, or a new job, or on an extended trip abroad. In the following decades, writers could only occasionally build up enough courage to off lesser characters like M*A*S*H’s Lieutenant Colonel Henry Blake or All in the Family’s Edith Bunker, but not without a good deal of sentimentality. When prestige programming eventually waded into the murky waters of drug dealers and mobsters, it never dared to push its Nancy Botwins or Tony Sopranos under water long enough for them to drown. (At least, not until The Sopranos’ ambiguous finale.)

The execution of noble protagonist Ned Stark at the end of Game of Thrones’ first season trampled all over that precious norm, prioritizing the violent rules of its world over the personalities that occupied it. But it was with the infamous Red Wedding that Benioff, Weiss, and Co. introduced a new paradigm for television: a blatant disinterest in humoring fans with happy endings, and a complete transforming of a series into a controlled incubator for one continuous set of cast members. In turn, it has inspired modern-day prestige television to embrace the sporadic passing of main characters at any place and time, like a more creative version of Clue. Will Gardner in the courtroom by a deranged client with a stolen gun. Zoe Barnes on the DC Metro tracks by the hand of Senator Underwood. Poor, sweet, pudding-loving Carl Grimes in the church with a shotgun. The gory floodgates opened with Robb, Talisa, and Catelyn Stark and the stabbing in the Frey party hall. “Ned Stark was maybe the first time people’s expectations of the show were really shaken to their core,” Nutter said. “Then at the end of the third season this happens. I think everyone freaked out.”

Long before Game of Thrones premiered, the occasional demise of a beloved character was more a series utility than it was a reset. Jen Lindley’s (Michelle Williams) death by pulmonary congestion during the Dawson’s Creek series finale, for instance, was a thoughtful and G-rated event that creator Kevin Williamson felt would conclude the show and vault her peers into true adulthood. “We’ve dealt with so much—what’s the one thing yet to deal with?” creator Kevin Williamson told Entertainment Weekly this year, reflecting on how he decided to kill Jen. “And that’s the death of one of their own, one of their contemporaries, one of their circle. ... Nothing will make you contemplate your future faster than knowing you might not have one.” Though Mrs. Landingham’s surprise death-by-drunk-driver on Season 2 of The West Wing was nowhere near as gracious, the show’s creators described it as a necessary event so they could introduce flashbacks to earlier moments in her and President Bartlett’s relationship. “It really did add a tremendous amount of understanding to the president of the United States, at a time it was really necessary,” executive producer Thomas Schlamme told the Los Angeles Times in 2001, following blowback from fans. And Stringer Bell’s (Idris Elba) untimely demise in Season 3 of The Wire functioned as appropriate narrative closure for the show’s cruel, tragic arc. The ambitious drug dealer turned development scion is shot dead by rueful vigilantes on the unfinished floor of his B&B Enterprises building, a metaphor for his inability to thwart the institutions he sought to master. For so long, our beloved supporting actors were the sacrificial lambs of network television, an offering to a writers’ room keen on adding color, moving a series forward, or helping it close.

Running parallel to the precedent set by “The Rains of Castamere” was a cheapening of death itself. As it became clear that killing characters stirred conversation online, enterprising showrunners exploited the mechanism to maintain a kind of chaotic momentum. Shonda Rhimes has built multiple franchises around a steady diet of grandiose dialogue, beautiful cast members, and dramatic side-character deaths. The showrunner is so unsentimental about axing characters that she has admitted to blowing them up for post–Super Bowl audiences, and joked with her fellow writers about her favorite Scandal murder. (No wonder her fans have plenty to discuss on Twitter.) In 2015, long after the Red Wedding had set a precedent, she finally killed Grey’s Anatomy star Dr. Derek Shepherd (Patrick Dempsey) in a freak car accident. A few months after the bombshell death aired, Larry Wilmore asked her if she’d ever eliminated a character because she didn’t like the actor. “Uh, yes,” Rhimes replied coyly. “And I’m not naming names.”

Series that deal exclusively in murder are constructed to churn out so many dead bodies that eventually some of them end up belonging to a main character or two. In the final moments of Dexter’s Season 4 finale, “The Getaway,” the serial killer finds his wife, Rita, dead in a bathtub full of blood—a shocking, though hardly surprising development, given the fact he spent much of the season pursuing a personal rivalry with another mass murderer. Undergoing loss after loss for the sake of drama is exhausting for viewers, and shows that deal in shock eventually reach hype half-lives. It makes sense, then, that Scandal, Dexter, and The Walking Dead have been criticized for overstaying their broadcast welcome.

Maybe all that excess blood and guts is what has recently pushed more realistic programming to avoid overly pedantic, or sensational methods of elimination. Halt and Catch Fire creators Christopher Cantwell and Christopher C. Rogers encountered this very issue when they holed up in a Joshua Tree cabin in 2016, tasked with writing the show’s fourth and final season. Earlier in the series, Gordon Clark, a once-promising engineer, learns his brain matter has degenerated after being exposed to certain chemicals at work. Tasked with ending the series, Cantwell and Rogers wondered how best to end his life without resorting to something cheap or gruesome. “We’ve never been a show with guns, we’ve never been a show with that high-stakes feeling,” Cantwell told me. “The show has a pH balance that if you upset it, it will tell you, and it will go ‘Nope, that doesn’t work.’ If you go too outside the purview of the show and its emotional limits, it’s going to feel strange. It all had to boil down to the emotion.” In the end, they settled on an episode in which Gordon spends the day tinkering with a broken air conditioner in his startup’s office, fixes it, goes home, and dies. His passing is illustrated as a series of flashbacks in his life that, per Cantwell, his “brain is processing, almost like a computer.” More important to the creators, however, was to give breathing room for the aftermath. For that reason, they timed Clark’s death to the fourth-to-last episode. “We wanted to play that card early enough so that it would register the way that death does in real life, which is sudden and kind of out of nowhere and not built to in a dramatic way,” he said.

Though tonally and aesthetically different in pretty much every way, you can still draw a through line between the delicate passing of a wise, nerdy hardware engineer and the unceremonial slaughter of a heroic family from some fictional land in the middle ages. “The Rains of Castamere” thwarted expectations, so that no audience could be sure their protagonists or patriarchs were safe, and entire narrative arcs might be reset within the span of one or two episodes. That kind of bold storytelling gave the medium of television more weight than ever before. And future generations of television are more cynical and paranoid because of it. “The audience reaction to the episode was really truly profound,” Nutter told me. “They were like, ‘Whoa, that was half the show.’ After that we definitely weren’t just a TV show anymore.”

Now more than ever, television is filling the spaces of untold stories, aiming to develop characters and narratives that, no matter how many dragons or supercomputers they may contain, help viewers process the complications of our own lives. Death, and its ruthless indifference to what’s convenient or who we love, will always be a part of that. (Vox counted an astounding 242 deaths on television in the 2015-16 season alone. And 21 of The Ringer’s 100 best television episodes of the century involve the loss of an important character.) That prestige TV has become bolder than ever in reflecting that reality in its story lines is, at once, both refreshing and soul crushing. It’s why millions of us fret in unison at the loss of a fictional character like we’re children who’ve lost our favorite stuffed animal. Nutter, who also directed the Game of Thrones episode in which Jon Snow is stabbed to death, cites one particular interaction with a fan that showed him just how universal that mourning process has become. “Between seasons, I was introduced to Barack Obama,” Nutter said. “And one of the first things he asked me was, ‘You didn’t kill Jon Snow, did you?’”

Disclosure: HBO is an initial investor in The Ringer.