Gillian Anderson's Dr. Jean Milburn gets pregnant in Sex Education season 2, much to the surprise of both herself and viewers, and it makes for an odd trend for the actress' characters that goes back to The X-Files. Anderson has starred as Jean in both seasons of Netflix's Sex Education so far, playing the sex therapist mother of series protagonist Otis (Asa Butterfield), although the show follows her own romantic entanglements as well.

Of course, Anderson remains best known for her role as FBI Special Agent Dana Scully on Fox's The X-Files, appearing in over 200 episodes of the alien-centric series, as well as the movies. Jean and Scully are fairly different characters with very different jobs, but that doesn't mean Sex Education season 2 can't continue on a storytelling device that was used on more than one occasion for Anderson's character on The X-Files: pregnancy.

Related: Why Sex Education Season 2'S Ending Is So Divisive

In Sex Education season 2, Jean is dating her neighbor, Jakob (Mikael Persbrandt), who to complicate matters is the father of Otis' girlfriend, Ola (Patricia Allison). Things don't work out for either couple, with both breaking up as season 2 progresses, but there's a big twist in the tale for Jean and Jakob. At the end of Sex Education season 2, when Jean is seeking medical advice because she isn't feeling well, it turns out that she's pregnant, and Jakob is the father. This shouldn't have been able to happen, however, since Jakob had previously had a vasectomy. If that sounds familiar, it's because it's a trick The X-Files pulled not once, but twice - although admittedly under different circumstances (h/t TV Guide).

Gillian Anderson as Jean Milburn Netflix Sex Education

The first time a Gillian Anderson character fell pregnant against the odds - and against what she believed could happen - was in The X-Files season 7 finale, "Requiem". At the time, this was treated as a big mystery, and later episodes would see Scully and her partner, Fox Mulder (David Duchovny) refer to William as their son. The pair had previously tried for a baby, unsuccessfully, and Scully thought that she couldn't have kids. It was something of a big surprise, then, when she became pregnant with William, although he was later given up for adoption. It's later revealed, in season 11, that Scully had been artificially impregnated by the Smoking Man. At the end of that same season, Scully announces that she is pregnant again, one more despite the odds being against it.

Sex Education may not use aliens or mysterious villains to have its own Gillian Anderson character fall pregnant, but it's nonetheless easy to see the strange parallels between what has happened to her character in the Netflix show and on The X-Files. It'll be very interesting to see how Jean approaches her own pregnancy and whether she keeps the baby, since she wasn't happy to get the news, and that should make for one of Sex Education season 3's more dramatic sub-plots.

More: Sex Education Season 2 Ending Explained: Maeve & Otis’ Future After The Voicemail