Floriana Lima has landed a series regular role on the upcoming second season of the superhero drama.

Supergirl has cast its Maggie Sawyer.

The CBS-turned-CW series has tapped Floriana Lima (The Family) for the series regular role inspired by the gay DC Comics character, The Hollywood Reporter has learned.

Created by John Byrne, Maggie was first introduced in 1987 as a captain of the Metropolis Special Crimes Unit where she was a highly skilled member of the Science Police, the division of the police department that deals with metahumans.

Additionally, Maggie was revealed to be a lesbian in the Superman titles, making her one of the first openly homosexual characters in mainstream comics. She later went on to become romantically involved with another famous female superhero, Batwoman, in addition appearance in several Batman titles.

On the Warner Bros.-produced Supergirl, Maggie will be a detective for the National City Police Department who takes a special interest in the cases involving aliens.

Supergirl executive producer Greg Berlanti, who is also an EP on Arrow, The Flash and DC's Legends of Tomorrow, spoke with THR earlier this year about the importance of being all inclusive. His DC Comics shows have changed the ethnicity and sexuality of several iconic comic book characters to better reflect present day, like Supergirl's Jimmy Olsen (Mehcad Brooks) and Arrow's Curtis Holt (Echo Kellum), respectively.

"I wanted to contemporize these comics that I loved growing up and have them reflect the society that we live in now," Berlanti said. "It's still about working in some of those very real qualities so that everyone feels represented."

Maggie Sawyer is one of several famed DC Comics characters coming to Supergirl for season two. Teen Wolf's Tyler Hoechlin has been cast as Kara's cousin Clark Kent aka Superman, and Cougar Town vet Ian Gomez will play journalist Snapper Carr. Additionally, former Wonder Woman star Lynda Carter is set to appear as the president of the United States.

The character of Maggie Sawyer previously appeared in several episodes of former CW series Smallville, as played by Jill Teed.

In addition to the ABC drama The Family, Lima's credits include Allegiance and The Mob Doctor. She is repped by AKA Talent Agency and Industry Entertainment.

Supergirl's second season premieres on Monday, Oct. 10 at 8 p.m. on The CW.