Vince Gilligan cast Bryan Cranston based on a one-episode spot on the Fox show, while Aaron Paul and Dean Norris also had small roles before 'Bad.'

The X-Files is coming back to Fox as a limited series. The groundbreaking show brought sci-fi into people's homes from 1993 to 2002, and proved to be the gift that kept giving thanks to one of its greatest legacies: Breaking Bad.

Bad creator Vince Gilligan has often spoken about how his time as a writer on The X-Files influenced his storytelling, and that he learned how to be a showrunner by watching X-Files creator Chris Carter work. A number of Bad actors also appeared on the Fox show, including Raymond Cruz (Tuco in Breaking Bad and Eladio Buente in X-Files), Danny Trejo (Tortuga in Breaking Bad and Cesar Ocumpo in X-Files) and Michael Bowen (Uncle Jack in Breaking Bad and Dwight Cooper in X-Files).

See more 'The X-Files': Memorable Moments

But Bad might not have found its key ingredient had it not been for The X-Files. Read on to see five connections between X-Files and Breaking Bad.

1. Bryan Cranston

Bryan Cranston appeared in the 1998 X-Files episode "Drive," in which he played an unlikable racist whom Mulder (David Duchovny) must drive west to prevent him from dying. Though he was a nasty human being, by the end of the episode the audience felt sorry for him and his plight — which was exactly what Gilligan wanted in his Walter White.

See more 'Breaking Bad': 25 Most Badass Quotes

"You don't have to like him. But you need to sympathize and feel empathy and sorrow for him at the end of the hour," Gilligan said in 2011.

2. Aaron Paul

A 22-year-old Aaron Paul appeared in the 2001 X-Files episode "Lord of the Flies," which centered on a mysterious teenager with deadly (and creepy) fly-like abilities. The episode was written by Thomas Schnauz, who went on to pen some of Breaking Bad's most well-regarded episodes and who currently is a writer and producer on the spinoff Better Call Saul.

3. Dean Norris

Dean Norris, who played DEA Agent Hank Schrader on Breaking Bad, proved he could play a law-enforcement type on The X-Files, where he starred as U.S. Marshal Tapia in the 1995 episode "F. Emasculata."

4. X-Files references

Gilligan sprinkled X-Files references through Breaking Bad. Among them: The van rental company that Kuby (Bill Burr) used to transfer Walt's money in season five's "Burried" is the same one Mulder and Scully used throughout X-Files. Another tidbit: Mike Ehrmantraut's (Jonathan Banks) last name was referenced in the 1999 X-Files episode "Tithonus," which Gilligan wrote.

See more 'Better Call Saul': 'Breaking Bad' Easter Eggs You Missed

5. Michael McKean

Michael McKean wasn't in Breaking Bad, but he plays a key role in Better Call Saul as Jimmy/Saul's (Bob Odenkirk) brother, Chuck. In The X-Files, he played sleazy government agent Morris Fletcher in four episodes spanning 1998-2002. At one point, the character switched bodies with Mulder in the memorable "Dreamland." McKean says he knew from X-Files that working with Vince Gilligan on Saul was a must, even before seeing the script.

"It was a playable human being," McKean told The Hollywood Reporter of Fletcher. "It wasn't just a boogie man. I knew whatever they wrote there would be a real purpose in it."

What are your favorite X-Files/Breaking Bad connections? Let us know in the comments.