U.S. cities are again a ray of hope for the LGBTQ community.

A record number of municipalities – 78 – earned perfect scores for advancing inclusive policies in 2018, according to a report released Monday by the Human Rights Campaign Foundation and the Equality Federation Institute, two LGBTQ advocacy groups.

“Despite persistent efforts by some states and the federal government to roll back hard-won protections, cities are boldly and courageously pioneering the path forward on LGBTQ equality,” said Xavier Persad, legal counsel for the Human Rights Campaign and author of the Municipal Equality Index that rated 506 cities on inclusive protections and policies.

Last year, 68 cities attained the highest ranking, compared with just 11 the first year of the index in 2012.

Strides made by municipalities in welcoming LGBTQ residents and visitors are significant but not unexpected, Persad said. “Local leaders are most closely acquainted with the people their decisions impact. They are their friends, neighbors and family members,” he said. “City officials are less mired in the political dynamics that too often determine outcomes on higher levels of government.”

Cities are also more aware of the economics involved, Persad said, and laws that treat people equally can spur growth by attracting new residents, visitors and businesses.

The report comes in a year that has seen LGBTQ activists struggle to preserve fragile victories and fend off new challenges at the state and federal level. For example:

• A division within the Department of Health and Human Services Office of Civil Rights was created in January to protect health care workers who could cite religious objections to treating LGBTQ people.

• In June, the Supreme Court absolved a Colorado baker of bias for refusing to create a custom wedding cake for a same-sex couple.

• Two states last spring – Kansas and Oklahoma – passed legislation that allows state-licensed child welfare agencies to cite religious beliefs for not placing children in LGBTQ homes.

More:Record number of cities advance LGBT rights in 2017, despite federal, state actions

More:3 years after same-sex marriage ruling, protections for LGBT families undermined

More:New federal office to protect consciences, religious objections of health care professionals

More:Putting $$ where your values are: 68% would shop at businesses that back LGBTQ equality

This year, tougher benchmarks were added in weighing cities’ scores in the equality index: protections from bullying and so-called “conversion therapy” and access to single-user restrooms for all genders. They reflect innovative ways cities are blazing trails to end discrimination, Persad said, and make advances even more remarkable.

Even in locations where equality has faced challenges, cities have notched progress, according to the report. Brookings, South Dakota; Jackson, Wyoming; Sitka, Alaska; Kansas City, Kansas; and Morgantown, West Virginia, all passed comprehensive nondiscrimination orders in the past year. And Birmingham, Alabama, became the first city in the Deep South to attain a perfect score.

Other highlights:

• 56 cities expanded their equal employment opportunity policies to include sexual orientation and/or gender identity.

• 20 cities extended nondiscrimination requirements to businesses with whom they contract.

• 147 cities now offer transgender-inclusive health care benefits to city employees.

• 97 cities offer equal benefits to the same or different sex domestic partners of city employees and their legal dependents.

Cities are sending a resounding message with these milestones, one that cuts through politics, Persad said. “When elected leaders allow equal dignity to be their guiding principle — nothing can stand in the way of progress, not even partisan divides.”