AUSTIN — Dallas and Fort Worth remain two of the friendliest cities for LGBT Texans to live, but the rest of the region continues to lag far behind, according to national rankings released Thursday.

For the third year in a row, Dallas received a perfect score on the Human Rights Campaign's Municipal Equality Index, a nationwide survey that ranks cities based on how much local laws and policies foster greater acceptance for the lesbian, gay, bisexual and transgender communities.

Fort Worth and Austin were the only cities in Texas to also get the full 100 points. The average score in Texas was between 40 and 41 points, far below the national average of 57.

The nine other North Texas cities' scores either remained stagnant or lagged far behind Dallas and Fort Worth. Irving again received the lowest score both regionally and statewide, with 6 points out of a possible 100, and McKinney remained at 18 points for the second year running.

Plano got the highest marks in the region behind Dallas and Fort Worth, nabbing 74 points, the same score it received in 2016. And two North Texas cities saw large gains while still remaining below 50 points: Denton jumped from 35 to 44 points and Grand Prairie doubled its score to 24.

Texas grabbed national headlines this year as state politicians fought over whether to enact a bathroom bill to restrict restroom use based on biological sex. Widely criticized as a discriminatory measure meant to erode the rights of transgender men, women and children, the bill died after more than 50 Fortune 500 companies publicly opposed it.

Another proposal that would give religion-based adoption companies more legal cover if they denied services to LGBT couples and children was signed into law. California officials cited the new law, which they called discriminatory, in banning further state travel to Texas.

The Human Rights Campaign, a Washington, D.C.-based LGBT advocacy organization, included Austin, Dallas, Fort Worth and San Antonio on its list of "all-star" cities that have passed local ordinances prohibiting LGBT discrimination, even as top state officials reject statewide protections.

Outside of the region, the only other city to increase its score was College Station, the home of Texas A&M University, which saw an increase from 6 to 18 points since 2016.

Each city's rank was calculated by considering five categories:

Nondiscrimination ordinances: The presence or absence of local laws barring discrimination in employment, housing and public accommodations.

Municipality as an employer: Whether the city protects its LGBT workers from discrimination on the job and offers inclusive health care benefits.

Municipal services: Whether the city has a local "human rights commission" focused on LGBT citizens with a designated community liaison and whether anti-bullying rules are in place in schools.

Law enforcement: Evaluates the relationship of the police force to LGBT citizens and tracks whether law enforcement reports hate crimes to the FBI.

Relationship with the LGBT community: How local leaders publicly express their stance on LGBT rights, and whether they push LGBT legislation.

HRC rated 506 cities this year, including all 50 state capitals, the 200 largest cities and most-populous cities in each state, and the cities and towns with the states' largest public universities. In Texas, 25 cities were ranked.