By Alexander Kacala

From ABC’s “Grey’s Anatomy” to The CW’s “Supergirl,” broadcast television has served up a historic season for lesbian, gay, bisexual, transgender and queer characters.

"The percentage of LGBTQ series regulars on broadcast primetime scripted programming is up to an all-time high of 8.8 percent," according to LGBTQ media advocacy group GLAAD, which has been tracking LGBTQ characters on TV for more than two decades.

Last year’s annual “Where We Are on TV” report found 6.4 percent of broadcast primetime characters were LGBTQ, making this year’s findings a nearly 40 percent year-over-year increase.

“With anti-LGBTQ policies being debated here and abroad, the stories and characters on television are more critical than ever before to build understanding and acceptance of LGBTQ people,” GLAAD President and CEO Sarah Kate Ellis said in a statement shared with NBC News.

“Not only do stories that explore the rich lives and identities of LGBTQ people move the needle forward culturally, but they pay off in ratings — shows like 'Will & Grace,' 'Supergirl,' 'Empire' and 'How to Get Away With Murder' all attract millions of viewers weekly and demonstrate that audiences are hungry for new stories and perspectives,” Ellis added.

GLAAD found that of the 857 series regular characters counted on 111 primetime scripted shows across the five broadcast networks — ABC, CBS, The CW, FOX and NBC — 75 series regular characters were LGBTQ, up from 58 last year. GLAAD also counted an additional 38 recurring LGBTQ characters on these programs. Gay men made up more than 40 percent of the combined regular and recurring characters.

For the first time, GLAAD found LGBTQ people of color outnumbered white LGBTQ characters on broadcast TV. Of the 113 LGBTQ regular and recurring characters on broadcast programs, 49 percent were white, 25 percent were black, 12 percent were Latino, 8 percent were Asian-American and 5 percent were multiracial or “other race,” the report found.

Alexia Garcia as Aphrodite, Hailie Sahar as Lulu, Anjelica Ross as Candy.JoJo Whilden / FX

It was not just broadcast television that had a banner year in terms of LGBTQ inclusion. GLAAD also tracked sizable increases in LGBTQ characters in cable and streaming programs.

The number of LGBTQ regular characters on scripted primetime cable shows increased to 120, up from 103 last year — a 17 percent jump. A noteworthy program in the cable TV mix is “Pose” on FX. The Ryan Murphy series about the underground voguing ballroom scene in the 1980s features the largest cast of series regular transgender actors in the history of scripted television.

Orange is the New Black season 3JoJo Whilden / Netflix

Since GLAAD began tracking LGBTQ representation on streaming video platforms three years ago, Netflix has been number one — and this year is no different. The streaming service has a record 88 LGBTQ regular and recurring characters this season, nearly doubling last year’s 46. “Orange Is the New Black” and “GLOW” are just two of the many Netflix programs with LGBTQ-inclusive casts.

While lesbian, gay, bisexual, transgender and queer characters are becoming more commonplace on TV, GLAAD is still urging the industry to do better.

“GLAAD is calling on the industry to make sure that within the next two years, 10 percent of series regular characters on primetime scripted broadcast series are LGBTQ,” Ellis stated in the report. “This is an important next step towards ensuring that our entertainment reflects the world in which it is created.”