Nearly 53 percent of voters cast their ballots against Proposition 1, which was proposed by nonprofit Christian policy group Alaska Family Action.

The bill's success would have meant scrapping the city's nondiscrimination ordinance, which allows people to use the restrooms and changing facilities aligned with their gender identity. Instead, it would have forced transgender people to use the public restrooms that align with the sex listed on their birth certificates.

The results of the vote, which also saw the re-election of Mayor Ethan Berkowitz, who signed the city's nondiscrimination ordinance into law in 2015, are scheduled to be certified on April 17.

Local rights organization Fair Anchorage called the bill's defeat a "victory," with Field Organizer Lillian Lennon writing in a statement: “Anchorage voters rejected fear and intimidation to affirm that everyone in our city should have the same fundamental dignity and protection under the law."

“As a transgender woman, this victory is deeply personal to me and to so many of us in the transgender community. It means voters saw past misleading tactics by opponents of transgender equality in order to treat people like me fairly," Lennon said.

American Civil Liberties Union (ACLU) Alaska said the outcome represented the "first time anywhere in our nation a standalone, anti-transgender 'bathroom bill'—Prop 1—was defeated at the ballot box."

ACLU Alaska Executive Director Joshua A. Decker celebrated the results, but warned that there is still "plenty of work to do to empower and support the transgender community."

"We also must recognize that while we won this victory, there were still 47 percent of Anchorage voters who said they didn't think transgender folks deserve the same rights as everyone else," Decker said in a statement. "That is a number too high to guarantee the merchants of inequality behind Prop 1 won't try again or even that they can't succeed."

Similar bills were being considered in at least six other state legislatures so far this year, including in Iowa, Kentucky and Missouri, according the ACLU.

Such proposals have been dubbed "bathroom bills," however LGBTQ advocacy group GLAAD has said the term is often used to "oppose nondiscrimination laws that protect transgender people."

GLAAD said the defeat of Proposition 1 in Anchorage would help lay the groundwork and "provide a blueprint to combat the growing trend of anti-transgender ballot measures popping up across the country."

Massachusetts will run the first statewide ballot initiative on transgender rights, which will come up on the November 2018 ballot, the organization said.