CW's " Riverdale " on Wednesday laid to rest the father of Archie Andrews (KJ Apa) in an episode seeped in grief that transcended the world that exists on the small screen. Luke Perry , who portrayed the character, died in March after suffering a stroke at age 52.

In the episode, Fred dies in a hit-and-run accident after stopping alongside the road to help a stranded motorist, played by Shannen Doherty , who co-starred with Perry on "Beverly Hills, 90210."

Archie, with his friends at his side, sets out on a quest to bring his father's body back to Riverdale from Cherry Creek, where the accident happened.

While in town visiting the site of the accident, he encounters the woman his father helped and learns she was almost hit by the car that killed Fred. Archie's father pushed her out of the way and ended up being struck himself, she tells him.

"He saved my life, and if he hadn't done what he did, there's no way I'd be here right now; I know that," she tells Archie.

Archie (KJ Apa) and Mary (Molly Ringwald) cope with the shock of Fred's (Luke Perry) death in the new episode of "Riverdale."

Archie, overcome with grief, briefly sets out on a quest to confront the driver who killed his father. However, he learns that the man charged with the crime only turned himself in to protect his teenage son, who had taken the car without permission and ended up hitting Fred before fleeing the scene.

Archie, himself no stranger to immature mistakes, is deeply impacted by the revelation, as he knows his late father would have done the same for him.

The gang makes it back to Riverdale and lays Fred to rest. At his funeral, Archie remembers his dad as someone who was there "for every high and every low."

"He was the greatest man I've ever known. It hurts me that I never got to say goodbye, that I won't ever get to see him again or talk to him. But his spirit and his memory live on in this town and in everyone he's met," he says. "Fred Andrews will always be a part of Riverdale."

With a befitting tribute, "Riverdale" has brought to a bittersweet conclusion Perry's legacy on television, where his absence will be felt whether you knew him best Fred Andrews or Dylan McKay. But like his final series, he'll always be part of it.