The following contains spoilers for Legacies Season 4, Episode 20, "Just Don't Be A Stranger, Okay?," which aired Thursday, June 16 on The CW.

After four seasons of Legacies, the Vampire Diaries spin-off is permanently closing its doors. Last week's series finale, "Just Don't Be A Stranger, Okay?" opened with the Salvatore School for the Young & Gifted grieving over their fallen friend Ethan (Leo Howard), who perished in the Super Squad's showdown against the god Ken (Luke Mitchell). In the aftermath, headmaster Alaric (Matt Davis) decided the school was no longer a safe haven for the student body and announced its closure. Grappling with the news, Hope (Danielle Rose Russell) and the others reflected on their lives at the institute and began to look at what the future holds for them.

The episode also marked a brief appearance by Hope's deceased father, Klaus (Joseph Morgan), who delivered a heartfelt message to his "miracle child" from beyond. In addition, The Vampire Diaries' OG stopped by to take over running the school moving forward. Showrunner Brett Matthews recently spoke to CBR about crafting a series finale, leaving Hope, Lizzie (Jenny Boyd), and company in a good place, Klaus and Caroline's appearances, and what was in store for Season 5.

RELATED: Legacies' Danielle Rose Russell Breaks Down The Series Finale & Klaus' Return

Legacies Jed Outside

CBR: Going into this season, how much were you gearing towards a season finale as opposed to a series finale?

Brett Matthews: Look, I don't remember the timeline, but there was a point where I got a call. It basically said, "All this stuff is happening at the network. We don't know how it is going to play out." It was a couple months' notice to start gearing it towards that. I knew a lot of shows at the CW got this call -- and I believe they were ultimately canceled -- that said, "I don't know how this is going to go. In as much as you can, try and gear this season towards a series finale or a continuation." Obviously, a very tall task, and one we tried to accomplish as well as we could in the time that we had.

Series finales are a tough nut to crack. In broad strokes, what did you want to accomplish in Legacies' final hour?

For us, it was finding the emotionally satisfying ending for every character, in as much as we can with a big cast, and just finding an ending that felt right to us and our audience. It was just emotion first. What is the conclusion of this story we had been telling with these characters for four years? More than any other show in the franchise, it was important to leave these characters in a good place. Legacies has always been this relentlessly optimistic show. Whether people like that or don't like that, it really was its mission statement. Seeing characters happy and seeing them in a good place was certainly our priority.

RELATED: Ashley Tisdale Almost Had a Huge Role in The Vampire Diaries

The finale opens with the Salvatore School mourning the loss of Ethan. What kind of conversations did you have over the collateral damage in the battle against Ken? Did you ever consider a higher body count?

Not really. Legacies just isn't that show. In the old show, I'm sure, yes, we would have been halfway to a new cast because bodies drop all the time on the other shows. Again, that's not really in Legacies' DNA. There was no world where we were going to shuffle a bunch of people off. At the same time, it did seem like we needed one of the losses to be permanent and ultimately lead to a good place for that character. That's why we decided to do things the way we did.

How did you land on Alaric deciding to close the school? What did that allow you to explore with the characters?

The finale is very not plot-driven, so that is the "plot driver" of the episode. Is the school going to close forever? While it is slight, it is something that is deeply meaningful to all characters and really asks them to examine what the school means to them and their attitudes and how they have changed from the pilot. The big shift is in the finale [is] it is really about what the school means to them as opposed to being told what the school should mean to them. I think that's the journey. The kids have all come into their own and are their own people. What they say, ultimately, has more weight than the administration. That is very much in keeping with Legacies' mission statement.

RELATED: Legacies Writers Tease the Series' 'Perfect' Finale

Legacies -- “Was This The Monster You Saw” -- Image Number: LGC409a_0515r -- Pictured (L - R): Chris Lee as Kaleb and Omono Okojie as Cleo -- Photo Credit: Chris Reel / The CW -- © 2022 The CW Network, LLC. All Rights Reserved.

The Salvatore School was initially built for Lizzie and Josie, with Hope taking center stage. What kind of closure did you want to give Hope between her boyfriend Landon, deceased father Klaus, and her own personal demons?

Hope has been such an important character in this universe and, obviously, the leading star in our show. She means a lot to the franchise. Hope has always had this awful weight in this awful prophecy about what she's going to become. People have assumed the worst about her. The journey of these four seasons is to see a lot of those things come true and to see her go through those things, experience that trauma so many of today's youth does, and come out the other side stronger than ever. That really was the journey we set early on in Season 1, that Klaus would not reach peace until he knew she would be OK.

That is the journey with him moving on to peace, it's him saying that she is going to be OK. I think Hope really knows that. She's really come to redefine her relationship with the school and her relationship as a leader that has gone from one of grudging acceptance to a wholehearted embrace. That really is her journey. It's about a kid growing up and seeing that they have turned out well and garnering their parents' approval, and who doesn't want that? While she can exhibit some of Klaus' worst qualities, she can also exhibit some of Klaus' very best.

What was the thought process behind Jed [Ben Levin] losing his werewolf curse?

We knew Ben [Zane Phillips] and Jed would be an important part of the show moving forward. It was a very good obstacle to put in their way and something that would have begot more story. At the same time, Jed has been a character who comes from a very abusive upbringing and being told what he is and this is how you do it. He has become a character that has come into his own about wanting to do things his own way. To give him that clean slate and to give him that do-over felt like he deserved it and earned it. It would certainly have given us a lot more story moving forward.

RELATED: The CW Reveals Legacies' Series Finale Date

Landon [Aria Shahghasemi] became the Ferryman, and it feels like that character has been building towards some greater purpose for a while. Has that always been your intention?

I wouldn't say always from the beginning of the show. I think he's gone through a lot of changes. Again, in looking through the four-season story, Landon grew up as a foster kid who didn't feel welcome anywhere and never felt like he had a home. Despite a very tumultuous upbringing, he always had this very big heart and was kind of the moral compass of the show and wanted to help people. It was about putting him in a role where he could do that and was an answer to all those things. At the end of the show, Landon has found a home. Is it exactly the one he expected or would have chosen for himself? No, but that's how life works. His relationship with Hope is probably deeper than ever. Is it exactly how he or she would have chosen for it to be? Not exactly, but that's the nature of young love.

Lizzie was another who struggled with her identity and place in this world. Where did you want to leave her?

The only place Lizzie could end is well. She has always been a character that has been so hard on herself and held herself back and been her own biggest critic. To see her come out the other side with a real sense of who she is and a real confidence in who she is and her powers and her ability, that is where we ultimately wanted to get her. She certainly earned it.

RELATED: Legacies, The CW's Final Vampire Diaries Series, Canceled After Four Seasons

Legacies Danielle Rose Russell

Klaus makes an appearance from beyond. Joseph Morgan is currently in Toronto shooting Titans. How much did his filming schedule affect your plans for Klaus?

Oh, hugely. Welcome to Covid. Welcome to him being a series regular on another show that has significant demands on his time. We shot that scene up in Toronto. In a perfect world, we would have brought Joe down and put him and Dani in a scene. All that said, we were so thrilled to have him involved. He was so eager and enthusiastic to do it. Once he read the script, [then] it was about how we can make this happen. Obviously, there's some magical means by which this scene happened, but the scene was really what mattered to Julie [Plec] and I. We were very excited to see him again. If you told us Legacies had to end, it was the thing that had to happen, and we were very glad it did.

Alaric stepped down as headmaster, and Caroline [Candice King] stepped in. When did you know you had Candice King locked in?

When we finished the script, I called her, and she said "yes" almost immediately. It was the right time. Candice has become a very good friend to us over the 10 years. The timing has never been quite right for her, but that character means a lot to her. Her time on The Vampire Diaries means a lot to her. It didn't take any convincing. Just having her around was very special to us and very special to our cast.

If Legacies had been renewed, what did Season 5 look like?

There were germs of future storylines in the finale. The Jed/Ben curse. The Cleo [Omono Okojie]/Kaleb [Chris Lee] obstacles and the hinting of what the future of those characters are. We would have been in a time-jump scenario. I think the fun of the fifth season would be to really take those characters, who had reached such a good place in the school, and then move them beyond it and throw them in lives beyond it and seeing where they were and how they would all find their way back to one another.

The series finale of Legacies aired June 16.