While a barrage of anti-LGBT bills in state legislatures made headlines in 2017, U.S. cities were quietly notching victories in the battle for equal rights.

A record 68 cities earned perfect scores for advancing LGBT inclusive policies and practices this year, according to a report released Thursday by the Human Rights Campaign Foundation and the Equality Federation Institute, two LGBT advocacy groups.

The report, which ranks advances at the city level, “demonstrates an encouraging steady trend toward full municipal LGBTQ equality,” said Sarah Warbelow, legal director for HRC.

Progress on transgender equality was singled out as significant by the groups, which have been tracking equal rights with a Municipal Equality Index scorecard for six years.

Twenty-five cities revised city employee health care plans in 2017 to cover transgender related health services, such as hormone replacement therapy or gender confirmation surgery. Now, 111 cities nationwide offer such health services, up from 86 in 2016 and just five in 2012.

The report lands in a year that saw activists fending off legislation in statehouses as more than 100 anti-LGBT bills were introduced in 29 states. The transgender community was targeted with about 39 of those bills: from banning transgender people from using bathrooms that match their gender identity to preventing them from obtaining accurate documents like driver’s licenses.

Rollbacks at the federal level have also left LGBT activists feeling under siege.

In February, the Justice and Education departments reversed guidance the Obama administration had issued that said Title IX protected the rights of transgender students to use facilities that match their gender identity.

And President Trump issued a directive this summer to reinstate a ban on transgender people serving in the military.

One of the key findings of the report, the authors say, is that cities continued to press for protections despite those threats. Wheeling, W.Va., and Carlisle, Pa., for example, strengthened protections in private employment, housing and public accommodations. In the South, Birmingham became the first city in Alabama to enact an all-inclusive non-discrimination ordinance.

“Municipalities from every corner of the country — no matter their size or political leaning — continue to strive to realize the fundamental American value that no one should live with the fear of being fired, evicted or excluded from public places simply because of who they are or who they love,” Warbelow said.

Also striking, the report says: In addition to legislative changes, more cities modified administrative policies to stamp out discrimination. Eighteen cities updated their equal employment opportunity policies to include sexual orientation and gender identity; 13 extended the same employment non-bias requirements to businesses they contract with.

More:ROTC student takes on transgender military ban

More:Onslaught of anti-LGBT bills in 2017 has activists 'playing defense'

More:Even in 'good' states, LGBT advocates say there is work to be done

More:ACLU sues Michigan over religious exemptions for adoptions

The index rated cities of varying sizes drawn from every state in the nation. Alabama’s city averages increased the most this year, followed by cities in Iowa, New Jersey and West Virginia.

Of the 68 cities that earned perfect scores: 67 reported hate crime statistics to the FBI, 59 had contractor non-discrimination policies that included gender identity, 49 had an openly elected or appointed LGBT official in senior leadership.

The report acknowledges that some jurisdictions are limited in their ability to pass protections because of state law, while others are in states that already have enacted inclusive policies.

Pittsburgh is cited as one of 2017’s success stories in the report. After Trump’s election last fall, city residents urged the mayor’s office to take action to protect LGBT youth, notes Corey Buckner, community affairs manager in the mayor’s office. The result: A bill was passed by the City Council to protect youths from conversion therapy — intended to change sexual orientation or gender identity.

“When our city government enacted this bill, I knew that Pittsburgh will be a catalyst for our commonwealth and our nation,” Buckner said.

There is concern, Warbelow said, that some states could target the progress made at the municipal level by pre-empting a city's ability to pass non-bias measures.

But the groups are optimistic, she said. The report’s finding “that cities continue to pioneer the way forward on LGBTQ inclusivity — despite a difficult political climate — gives us confidence that the fight for equality will be won.”

Follow Miller on Twitter @susmiller