From “Lost in Space” and “Doctor Who” to “Hannibal” and “Elementary,” these TV shows have swapped the genders of iconic characters.

What’s old is new again, and that includes the practice of gender-flipping a role. Commonly seen in folk tales and comic book properties, the practice has been a staple on the big screen (“Ghostbusters,” “Oceans 8”) and gaining popularity on TV, especially when it comes to reimagining male characters as female.

Swapping a character’s gender often occurs in the process of remaking or reimagining a pre-existing story. The most recent example on TV is the casting of Parker Posey to portray the villainous Dr. Smith on Netflix’s reboot of “Lost in Space.” The role was originated by Jonathan Harris in the ‘60s-era Irwin Allen series.

But gender-flipping can also occur in the process of creating a new character. In the case of lawyer Jeri Hogarth on “Marvel’s Jessica Jones,” the production started by crafting a female character and then retrofitting her with an identity from Marvel. That’s how Jeryn Hogarth, a male attorney to the Heroes for Hire, transformed into the female attorney Jeri Hogarth, played by Carrie-Anne Moss.

“We’d created the character, wrote, and even cast Carrie-Anne before we choose the Hogarth name from the catalog,” series creator Melissa Rosenberg told IndieWire in an email. “Using the name didn’t change anything about the character whatsoever.”

In a reverse of the process, “Legion” creator Noah Hawley had at first conceived of Lenny Busker as an older male character, but after meeting with Aubrey Plaza, offered her the role instead. According to an interview with IndieWire, Plaza said she’d accept the role as long as the dialogue didn’t change to reflect the gender switch.

But why do this at all? Here’s a breakdown of what’s to be gained from switching male characters to female.

A Clean Slate

Where remakes are concerned, sometimes the original actor has created such an iconic interpretation of the role that it would overshadow those who might follow. Swapping out the gender creates a significant break in expectations and inevitable comparisons. Revamped “Lost in Space” executive producer Matt Sazama pointed this reason out regarding Posey portraying the new Dr. Smith.

“The reason we did [the gender-flip] was because Jonathan Harris’ performance is so idiosyncratic and specific and iconic, that we felt that frankly a male actor was going to be compared to him and would end up maybe glancing into caricature or imitation,” he said. “A female actor was going to have the latitude to reinvent the character for herself. We felt this was the best way to have this character that has so much baggage — good baggage, but is so well known — to have it be fresh again for 2018.”

This opens up the storytelling for the character as well. On “Lost in Space,” Dr. Smith gets an origin story and even a relative back on Earth.

“They came up with a past that we don’t really know about,” Posey said. “We get hints of what Earth was like by the behavior of what it’s been like to survive down there. So it was a human approach. It wasn’t political so much as a great idea.”

Gender Parity

As women continue to fight for gender equality, gender-flipping helps to even out the surfeit of male-dominated roles from the past. This also gives women the opportunity to tackle roles — such as playing badass heroes and villains — that were typically written for men.

In Ron D. Moore’s “Battlestar Galactica” reboot, both Boomer (Grace Park) and Starbuck (Katee Sackhoff) took roles that were previously portrayed by Herbert Jefferson, Jr. and Dirk Benedict, respectively.

In an audio commentary, Moore addressed how switching the genders also switched the expectation of how each gender was portrayed regarding strength along gender lines.

“I do hear comments … that the show on some level has switched the gender roles and that all the women on the show are strong and all the men on the show are weak,” said Moore. “People get annoyed that the men are such pusses and the men are always the last ones to figure things out, and the women make all the strong decisions… That’s a fair criticism. I don’t know that there’s anything wrong with that.”

Grace Park had been cast twice in gender-flipped roles: first as Boomer (whom Park also race-lifted) in “Battlestar” and then later as Kono in CBS’ new “Hawaii Five-0.”

When the latter series premiered in 2010, Park commented that gender-flipped casting allowed remakes to become more modern and relevant.

“Back in the day, we used to have much more male-centric shows,” she said. “You still have male-heavy shows, but having a woman in there adds a new dimension.”

New Dimensions and Character Dynamics

CBS

Gender-flipping a character from male to female can sometimes change the DNA of the story and character dynamics. Months before “Elementary” premiered in 2012 and introduced Joan Watson (played by a race-lifting Lucy Liu) to replace the traditional Sherlock Holmes sidekick John Watson, producers had to address the change at Comic-Con.

Robert Doherty said, “When this opportunity arose, I did a lot of research —psychological assessments of the original characters by actual doctors. One of the things I came across is that Holmes struggles a bit with women. He struggles with people in general, but there are moments when he doesn’t quite seem to get the fairer sex. What could be more trying for Sherlock Holmes than working with Watson as a woman?”

In the BBC’s “Doctor Who,” the alien time traveler known as The Doctor will regenerate for the first time in over 50 years as a woman (Jodie Whittaker). It’s still too early to tell how the gender flip will affect storytelling, but having a female Doctor could affect how she is treated in her travels through a male-dominated and misogyinstic past.

Furthermore, in AMC’s 2016 limited series adaptation of John Le Carre’s “The Night Manager,” Olivia Colman replaced the novel’s character Leonard Burr to instead portray Angela Burr, a Secret Intelligence Service agent who helps former soldier-turned hotelier Jonathan Pine (Tom Hiddleston) infiltrate the inner circle of arms dealer Richard Roper (Hugh Laurie).

“In the novel, I guess it was more because of this British class thing, which is like white male, public school-educated, which is Roper and Pine to a point,” director Susanne Bier said in an interview. “And Burr was sort of from a different class, a less upper-class background. And if you were to update it to today, it felt very natural that that character become a woman because there is a sort of intrinsic class fight – in this case, then, a gender fight — which becomes a part of it. Not that it’s actually outspoken in the series, but it’s there as part of the DNA of the whole thing.”

Challenging Viewers’ Perceptions

Copyright BBC Worldwide 2017

In some cases, a fundamental part of a character hasn’t changed even after swapping genders. But the viewers’ perception of a character has changed depending on their take on gender roles and dynamics.

For example, part of the initial outcry against “Elementary” reimagining Watson as a woman lay in a fear that this would lead to a romance between Watson and Sherlock (Jonny Lee Miller), instead of the usual friendship and partnership between the two. This is based on the assumption that two straight leads of the opposite sex can’t simply be friends or colleagues on a TV show.

“I recognize that it’s a challenge to avoid, but it’s not a ‘Will they or won’t they?’; that’s not the intention,” said Doherty at Comic-Con. “It’s really about trying to honor the spirit of the stories and the material which showed an incredible friendship that grew over time.”

Perhaps the best example of how a viewer may reveal their own or cultural bias is in the casting of Whittaker as “Doctor Who’s” new hero. The 11th season has not even aired yet, but many fans had dismissed the casting as mere political correctness.

In addition, Peter Davison, who played the fifth incarnation of the Doctor, lamented that switching the character’s gender meant a “loss of a role model for boys.” Sadly, this a) presumes that children can only admire adults of the same gender, and b) ignores the reality that young girls have already been modeling themselves after the male Doctors for over 50 years.

Additional reporting by Liz Shannon Miller.

Sign Up: Stay on top of the latest breaking film and TV news! Sign up for our Email Newsletters here.