It was only a matter of time before “The Simpsons” parodied the Netflix sci-fi phenom “Stranger Things.”

The segment, titled “Danger Things,” aired Sunday on Fox during the 666th episode of the iconic cartoon, now in its 31st season, for its annual “Treehouse of Horror” special.

The spoof story includes Lisa as Millie Bobby Brown’s Eleven, and Milhouse becoming stuck in the Over/Under — their version of the Upside Down — just like “Stranger Things” character Will Byers. Bart, Nelson and Ralph filled the roles of Will’s pals Mike, Dustin and Lucas.

At one point, Lisa, who shares Eleven’s psychic powers — and also her shaved head — has to save Milhouse, whose legs are ripped off by a monster in the Over/Under.

“Girls are afraid to use [their psychic powers] because then we’re called unfeminine,” she says. “We needlessly lost a lot of good witches at Salem.”

The portal to the Over/Under is opened by none other than Springfield’s own villainous madman, Mr. Burns.

“Mr. Burns opened a portal to another dimension that released a lot of monsters,” says Homer. “It’s all part of a secret government program . . . to find monsters.”

Homer, the bumbling hero, finds himself battling monsters in the Over/Under, while Lisa returns to the Lisa as she appears in her debut on “The Tracey Ullman Show” in the ’80s.

The “Treehouse of Horror” episode is available to stream now on Fox.