In a world where most aliens are seen as threats, how did “Supergirl” character Maggie Sawyer (Floriana Lima) become a strong proponent of alien rights?

In a recent interview with Entertainment Weekly, executive producer Andrew Kreisberg revealed that growing up in an environment where her race and gender didn’t quite fit in led her to have sympathy for everyone who is going through the same struggle.

“Maggie is a strident advocate for alien rights,” Kreisberg said. “She says in her introductory episode that growing up gay and Latina in Nebraska made her ideally sympathetic to people who are different and people who don’t quite fit in.”

Apparently, adding a lesbian Latina character on “Supergirl” is part of executive producer Greg Berlanti’s attempt to make The CW’s DC TV universe more inclusive.

“I [have always] wanted to contemporize these comics that I loved growing up and have them reflect the society that we live in now,” Berlanti told The Hollywood Reporter in May. “It's still about working in some of those very real qualities so that everyone feels represented.”

Since it was revealed that Maggie is an alien rights advocate, some fans had started to wonder whether Maggie — a detective for the National City Police Department — has a hidden agenda behind her special interest in cases involving aliens. Those speculations, however, were dismissed by Kreisberg when he confirmed to TVLine last month that Maggie “is an ally.”

While Maggie is going to be a friend, Kreisberg said that there’s going to be an issue of jurisdiction between the Science Police — the department Maggie works for — and the D.E.O. (Department of Extra-Normal Operations), as the former deals with any cases that are “out of the ordinary,” while the latter monitors any extra-terrestrial presence on Earth.

“Supergirl” Season 2 premieres on Monday, Oct. 10 at 8 p.m. ET on The CW.

Floriana Lima “Supergirl” executive producer Andrew Kreisberg revealed why Maggie Sawyer (Floriana Lima) end up becoming a strong proponent of alien rights. Pictured: Lima attends a DJ night hosted by Vanity Fair, L'Oreal Paris, & Hailee Steinfeld at Palihouse Holloway on Feb. 26, 2016 in West Hollywood, Calif. Photo: Getty Images/Mike Windle