Boston does pretty well at ensuring LGBTQ people are treated equally here, according to the Human Rights Campaign (HRC).

The HRC Foundation on Monday released its fifth annual  Municipal Equality Index, which it describes as “the only nationwide rating system of LGBTQ inclusion in municipal law and policy.”

The index looks at how cities are taking it upon themselves to protect the LGBTQ community with laws and policies prohibiting discrimination along with making sure everyone has the same access to city services and public accommodations.

Boston received a perfect score, 100 percent, across five categories, as well as 10 bonus points for achievements like having an openly LGBTQ municipal leader (elected or appointed) and for being pro-equality despite more restrictive state laws.

Boston was one of 60 cities, along with Cambridge and Worcester, to earn perfect scores this year, according to the HRC. This is up from 47 in 2015 and 11 in 2012, the first year of the index. The Municipal Equality Index rates 506 cities nationwide.

The average city score was 55 points, according to the HRC. Boston excelled thanks to its transgender-inclusive healthcare benefits, an LGBTQ liaison in the mayor’s office, as well as the police department and city resources such as LGBTQ services for youth, homeless and elderly residents.

Deborah Shields, the executive director of MassEquality, an LGBTQ advocacy organization, said that the portrayal was accurate but that there is always room for improvement.

“This city, like other cities, can do a lot better providing services to homeless LGBTQ youth as well as job opportunities for LGBTQ youth in general, and certainly training around bias issues for transgender people,” Shields said, “But of course, the mayor’s been great, the city council is fabulous. They’ve really stepped up.”

The index looks at 44 criteria under five broad categories for all cities: non-discrimination laws, municipal employment policies like transgender-inclusive insurance coverage and non-discrimination requirements for contractors, inclusiveness of city services, law enforcement and its reporting of hate crimes and municipal leaderships on matters of equality.

“This year, dozens of cities across the nation showed they are willing to stand up for LGBTQ people in their communities even when state governments are not,” HRC President Chad Griffin said in a news release. “This builds on a trend we have long observed: that local governments are at the forefront of our fight for equality."