Fox has the most gay characters on TV — overtaking ABC for the first time in six years.

But, overall, the number of gay characters on broadcast TV is down after last season’s “significant increase,” according to the Gay & Lesbian Alliance Against Defamation’s annual “Where We Are on TV” report.

The GLAAD report, which keeps tabs on the number of lesbian, gay, bisexual and transgender characters in prime time, also covers cable — which has retained its number of gay characters.

The study also divides gay characters into series regulars, supporting characters and recurring characters.

Broadcast leader Fox features eight gay characters, according to the report, including animated characters Waylon Smithers on “The Simpsons” and Terry and Greg on “American Dad” to “Glee’s” Blaine, Kurt and Brittany.

ABC clocked in with five gay characters as series regulars, including Callie Torres (“Grey’s Anatomy”) and couple Mitchell and Cam (“Modern Family”), though it has “significantly dropped” its number of gay characters from last season, according to the study. NBC, which counts Oscar Martinez (“The Office”) among its gay prime-time characters, also dropped in gay characters for the third consecutive season.

CBS finished last among the major networks, with only one supporting character, Kalinda Sharma (Archie Panjabi) on “The Good Wife.”

Cable has five gay lead series characters — including Officer John Cooper (Michael Cudlitz) on “Southland” — with 22 recurring characters and 22 supporting characters in shows including “Boardwalk Empire,” “The Closer” and “Nurse Jackie.”