Gideon is gone, but not forgotten.

That was the thinking Criminal Minds executive producer Erica Messer had when she decided to revisit the early days of the BAU with young Gideon and young Rossi at the helm on Wednesday's episode (9/8c, CBS).

"Within the mythology of the series, Gideon is a very important part," Messer tells TVGuide.com. "To go back and acknowledge that yeah, he was one of the godfathers of the BAU, it was like, let's do it. It's time to meet godfathers of the BAU. It's been a while since we've seen him as we knew him, but I thought, let's see who that guy was."

Mega Buzz: Get more scoop on young Gideon on Criminal Minds

Gideon, of course, hasn't been on the drama since Mandy Patinkin notoriously left the show over creative differences in Season 3 and was replaced by Joe Mantegna as Rossi. Though Gideon's been mentioned over the years, Messer felt, now that they're in their 10th season, it was the right time to take a "deep dive into the past." What sparks the time warp is the BAU's new case, which is actually an old one. The unsub's distinct M.O. forces Rossi to recall a serial killer who got away from him and Gideon in 1978. Cue flashbacks with Robert Dunne, who reprises his role as young Rossi, and Ben Savage, in an inspired casting as young Gideon.

"We were so lucky in casting that role," Messer says. "Ben is amazing. We were joking, 'OK, every year, we need a flashback.' He must've [binged] the first two seasons because he got so many characteristics down. Both guys were great, but the first time we saw Ben playing young Gideon, we were like, 'Um, this is awesome!'"

Even more awesome? Messer co-wrote the episode with star Kirsten Vangsness. "We had such a good time together," Vangsness says. "It was so much fun, which is kind of weird to say when you're writing about murders and stuff. But we got along like gangbusters."

SAG Awards: Check out the fashion hits and misses

Though she's also a playwright, Vangsness, a self-described "scaredy-cat," says she never really thought about writing for the show until the possibility came up during contract negotiations a few years ago. "When Erica and I started talking about it, that I could write this season, it came up so quickly," Vangsness says. "She was like, "Your options are the season finale or the one we're about to break. I have this idea for it.' ... I just lucked out getting to be part of creating such a big episode for our show."

Both Messer and Vangness say they were very conscious to give Gideon the proper due in the episode, especially because fans haven't seen him in so long. "We all love him and we want to be very reverential to the character," Vangsness says. "He casts such a large shadow over the team and they are only here now because he and Rossi were there at the beginning." As such, there are a lot of what Messer dubs "origin nuggets" in the episode, like Gideon and Rossi coining the term "signature" to describe the unsub's M.O. "It's stuff like that that our longtime fans I think will appreciate," she says. "So it was a lot of fun to figure out how to include all these details."

Messer and Vangsness each wrote two acts — the first two for the former and the last two for the latter — before convening. "Then Erica was like, 'I want the ending like this,' and she wrote a really beautiful ending," Vangsness says. "And then she was like, 'I like your flashbacks better. Rewrite mine.' So I did!'"

SAG Awards: Check out all the red carpet arrivals

According to Messer, however, Vangness' biggest contribution to the script might not be the flashbacks or the callbacks for fans, but the creepy violence — ironic coming from someone who hadn't seen The Silence of the Lambs until Messer told her to while they were writing. "There's a scene in there where the unsub's like [to the victim], 'I get to break something. What is it: you or it?'" Messer says. "That was from Kirsten. She came up with that! Sweet Kirsten, who doesn't like any of that stuff!"

"I did come up with that!" Vangsness says with a laugh. "I don't know what that means because this girl does not see violent things! I watched [Silence of the Lambs] at 10 a.m. ... I do not recommend doing that! This is a big episode for me: I got to co-write this love letter for the fans and I finally saw Silence of the Lambs!"

Criminal Minds airs Wednesdays at 9/8c on CBS.

(Full disclosure: TVGuide.com is owned by CBS.)

Check out young Gideon in the exclusive sneak peek below: