LOS ANGELES — The number of lesbian, gay, bisexual, transgender and queer characters on U.S. television shows have reached record highs, and advocacy group GLAAD said on Thursday that their stories were more important than ever given moves in the United States to roll back LGBTQ acceptance.

In it annual report on diversity on the small screen, GLAAD found 329 regular and recurring LGBTQ characters across all broadcast, cable and streaming TV platforms, including the first asexual and non-binary characters.

GLAAD President Sarah Kate Ellis said TV was a critical place for the portrayal of LGBTQ characters and their lives.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"At a time when the Trump administration is trying to render LGBTQ people invisible, representing LGBTQ people in all of our diversity in scripted TV programs is an essential counterbalance that gives LGBTQ people stories to relate to," Ellis said in a statement.

U.S. President Donald Trump in July announced he would ban transgender people from serving in the U.S. military. The White House has revoked guidance on letting transgender students use the bathroom of their choice in public schools, and Trump's administration has said that federal law does not ban discrimination against gay employees.

The GLAAD report found LGBTQ regulars on the main U.S. broadcast channels in TV shows like "Riverdale," "Empire" and "Designated Survivor" made up 6.5 percent of all characters, making the highest percentage in 22 years of GLAAD tracking.

Netflix's dark comedy "Bojack Horseman" and Freeform's supernatural "Shadowhunters" brought audiences the first asexual characters on television.

Showtime financial drama "Billions," Netflix and Family Channel teen drama "Degrassi: The Next Class" and Spike TV's comedy "Heathers" all feature non-binary characters, a term used to describe those who experience their gender identity falling outside the categories of man and woman, the GLAAD report said.

The emergence of new stories reflects the real world, GLAAD said, citing its own research which found 20 percent of 18-34 year olds identify as lesbian, gay, bisexual, transgender or queer/questioning.

The GLAAD report examined original scripted series airing or which were expected to air in primetime between June 1, 2016 and May 31, 2017.

FOLLOW NBC OUT ON TWITTER, FACEBOOK AND INSTAGRAM