Luke Perry as Fred Andrews and K. J. Apa as Archie Andrews on RiverdaleThe CW

Generation X wasn’t supposed to have icons. Of course, we wound up with plenty of them anyway—Whitney Houston, Kurt Cobain, Tupac Shakur, Heath Ledger. A humbler one showed up on our television screens in 1990 in the form of Luke Perry, who rolled into the cast of the teen drama Beverly Hills, 90210 like a James Dean–haired thundercloud. With smoldering looks and a poetic soul, Perry’s character, Dylan McKay, became not only a sex symbol for Gen Xers, but also an early springboard for a new role. As Fred Andrews—the father of Archie, the red-headed protagonist of The CW’s far edgier teen drama Riverdale—Perry took his heartthrob status and, with quiet virtuosity, flipped the script, becoming the wizened patriarch instead of the fatherless young rebel.

Perry, who died Monday of a stroke at the age of 52, joined the Archie Comics TV adaptation in 2017 as mostly a memory. Between the cancellation of 90210 in 2000 and the announcement of the Riverdale cast nearly two decades later, Perry had largely picked up a string of small jobs, including guest spots on programs such as Law & Order: Special Victims Unit and starring roles in straight-to-DVD features such as Silent Venom. Until Riverdale came along, Perry had become an idol of yesteryear, a respectable working actor who had nonetheless lost the luster of his 90210 pinup days.

Casting Perry as the perpetually furrow-browed father of Archie was a stroke of good fortune, both for the actor and for Riverdale, which is dedicating all future episodes to its late cast member. On the one hand, Perry snagged a high-profile gig on a series that was born amid intense buzz. The show, on the other hand, benefited from a seasoned pro with a built-in allure, especially to middle-aged viewers who still saw the sex appeal in Perry’s grizzled beard and the life-worn wisdom of his performance. Perry’s habitation of Fred Andrews was subtle yet powerful: In a town overflowing with neon lights, noir vibes, and dark machinations, Fred served as a moral compass for Archie, and for the morality-challenged Riverdale as a whole. If Riverdale is an admittedly melodramatic microcosm of America today—and it’s not a stretch to say it is—Fred was the peacemaker, the healer, a beacon of generosity, empathy, and integrity who, naturally, seemed to harbor some unsavory secrets of his own. How the showrunner Roberto Aguirre-Sacasa will handle the sudden absence of one of Riverdale’s most beloved characters now that Season 3 is under way is unclear, though there’s reason to hope that Fred’s story line will find a satisfying end.

Perry did far more for the show than turn in a solid, veteran-actor performance. Warmly nuanced and effortlessly charismatic, he anchored a stable of quirky characters and wild story lines—from the mysterious death of a football star to the protracted hunt for a serial killer to an intra-city gang war. As the backstory of Riverdale’s citizens has unfurled, and as the episodes have become more character-driven, the show has taken on a vast air of tragedy—and even mythology. But world building on the ambitious scale of Riverdale doesn’t work without a grounding force. And Fred’s steadfast refusal to fight dirty—especially in the Riverdale mayoral election, when he was pitted against his own ex-fling Hermione—helped define the poles of right and wrong in a setting that’s almost Shakespearean in its moral ambiguity. Riverdale, in many ways, can be seen as a post-truth Hamlet, with its endless cycles of revenge and redemption.

The series has also been favorably compared to Twin Peaks (the two shows even share an actor). Wednesday’s episode, “Fire Walk With Me,” went so far as to take its name from David Lynch’s feature-length prequel to the original run of Twin Peaks. There are a couple of fun references to Lynch’s show—including a sultry torch-song performance delivered by Gina Gershon as the mother of Archie’s best friend, Jughead—but the highlight of the episode is Perry’s scene. Rushing to Archie’s aid once again, after Archie has once again become an almost mortal victim of his own heroic generosity, Fred tells him, “You’re not an idiot, son. You’ve just got a big heart.” Like father, like son.

The camera might have had a love affair with Dylan McKay in the ’90s, but it moved in and settled down with Fred Andrews. Age became Perry, and not just his looks. There’s a gentleness, a philosophical stillness, to Perry’s portrayal of Fred. In the chilling cliffhanger ending to Season 1, the chemistry between Perry and K. J. Apa—who plays Archie, as well as the younger version of Fred in one of the show’s many flashbacks—is palpable. A shocking attack on Fred that leaves him near dead works so well not because it’s yet another act of violence in violent old Riverdale, but because of the silent reversal of Archie’s and Fred’s roles as protector and protectee. It’s tender in a way that cuts to the emotional core of an otherwise fun but often shallow series, one that thankfully isn’t content to rest on the merits of its stylish surface.

“You’ll have your own someday, son,” Perry joked to Apa in a recent interview, one of the many joint appearances the two did in promotion of Riverdale since its debut. Perry was referring to a Dylan McKay action figure that an interviewer had just handed to Apa, which elicited laughs from all involved. It’s a throwaway moment on a PR junket, but it’s as telling as any father-son scene in Riverdale. There’s Perry, grinning sheepishly and maybe a bit ruefully at an effigy of himself, one that emblematizes his past as one of the most desired and envied men in America. But it’s more than a faded-glory moment; it’s a passing of the torch, in a way, to Apa, who still has his whole career ahead of him. It’s also an acknowledgment of the meta nature of Perry’s role as Fred; it’s as though the character, like Riverdale itself, is aware that Perry once played a teenager not so different from the one he came to mentor on set.

In an earlier interview alongside Apa, in 2017—an exchange in which the two actors’ familial rapport was as charmingly evident as it was on the show—Perry said, “That’s the great thing about Riverdale. You peel this onion, and peel it and peel it, and everybody’s got a past.” Likewise, Perry’s own layered history enriched his performance on Riverdale. In time, the actor might have become as beloved for his role as Fred Andrews as he was for his role as Dylan McKay. One of the tragedies of Perry’s untimely passing is that we’ll never fully know just how iconic it might have been. But Fred Andrews, as Perry left him, more than defined his place in the mythos of the show. Riverdale, as good as it is, has always been one heartbeat away from pure camp. And now that heartbeat is gone.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.