Shannen Doherty is headed to Riverdale.
The Beverly Hills, 90210 alumnus is guest-starring on the drama's season four premiere – and only ET has the exclusive details on how Doherty's "emotional" role will honor the legacy of her longtime friend, Luke Perry.
Perry, who portrayed Archie's father, Fred Andrews, on the popular CW show, died at the age of 52 in March after suffering a massive stroke.
Riverdale executive producer Roberto Aguirre-Sacasa previously revealed to ET that the first episode of the drama's fourth season will be a one-hour standalone tribute to Perry. The addition of Doherty ensures a piece of his legacy will live on in Riverdale.
"Luke and Shannen were really, really good friends," Aguirre-Sacasa told ET over the phone last week. "Luke had talked to me on and off over the years about trying to find something for Shannen on the show and when we were putting together this special episode, we kind of wanted to include special people from Luke's life."
"There was a very emotional, important role and we sent the script to Shannen and she read it and loved it and said, 'I want to do it,' so it's about honoring their friendship a little bit," the showrunner continued. "I know she was really moved when she read the script and immediately said yes."
Cole Sprouse said during the panel on Sunday that it was "cathartic" having Doherty on set for the special episode, saying that it was helpful to have her around after she had also gone through her own grieving process following the death of her close friend.
Doherty posted to Instagram on Sunday with a sweet flashback photo confirming her Riverdale visit.
The news of Doherty's upcoming appearance was first announced on stage at Riverdale's Comic-Con panel in Hall H on Sunday afternoon. Dawson's Creek alum Kerr Smith was also announced as a new recurring character on the upcoming season, who will be introduced in the second episode.
Aguirre-Sacasa was tight-lipped on the details of Doherty's character, but he did reveal to ET that the 48-year-old actress will be sharing scenes with Perry's former on-screen son, KJ Apa.
"She helps Archie process what happened to his father. That's what I'd say about that character," he said.
Doherty has already traveled to Vancouver, Canada, to film her scenes in the season opener. When asked if Doherty's mysterious character could reappear in future episodes, Aguirre-Sacasa was quick with his response: "Absolutely."
"I always say, 'Never say never,'" he stressed. "There's always a chance that that character could come back, the door is always open."
Although the Riverdale stars were all smiles in their first back-to-work selfie earlier this month, the showrunner confessed that it's been a trying time on set.
"It's tough for sure, it's really emotional, but everyone has really come together," Aguirre-Sacasa shared. "Everyone is there knowing that this episode is about honoring Luke and honoring Fred, so the days have been emotional but everyone has really rallied together and come together for it."
It was also announced on Sunday that Dawson's Creek alum Kerr Smith has been cast in a recurring role as the new Riverdale High principal, Mr. Honey, who is described as “a bit of a hard-a** who takes a harder line with the students this year, especially with the seniors.”
Smith will first appear in the second episode of the new season, titled "Chapter Fifty-Nine: Fast Times at Riverdale High."
Philiana Ng contributed to this article.
Season four of Riverdale premieres Wednesday, Oct. 9 at 9 p.m. PT/ET on The CW.
To keep up to date on all things Riverdale, sign up for ET's daily newsletter below.