Alaskans have shot down a so-called “bathroom bill” that would have prevented transgender people from using the bathroom corresponding with their gender identity.

Fifty-three percent of voters in Anchorage, Alaska voted “no” on Prop 1 – a citizen initiative that would have required transgender people to use public restrooms corresponding to the gender on their birth certificates, according to the Anchorage Daily News.

The initiative was proposed by nonprofit Christian policy group Alaska Family Action, and staunchly opposed by transgender activists in Alaska and around the country. The public battle over the measure was one of the most expensive in Alaska’s history, according to Alaska Public Media.

The preliminary vote results are set to be certified on 17 April.

The measure – one of several similar “bathroom bills” proposed across the country in recent years – would have allowed employers to dictate which restroom trans customers and employees could use. Advocates, like Alaska Family Action’s Jim Minnery, said the initiative was about protecting people’s privacy.

Opponents, like Anchorage transgender activist Lillian Lennon, said it was a threat to transgender people’s safety.

Transgender Day of Visibility: Trans people share their stories

“If Proposition 1 were to pass, I would fear that I could be blocked from using the restroom that I identify with,” she told NBC News. “I would be forced to go into a men’s restroom where I wouldn’t feel safe or protected, and I definitely don’t think that anyone in that restroom would feel particularly comfortable with me there either.”

Ms Lennon worked on the “No on Prop 1” campaign, which raised more than $824,000 for advertising, consulting services, phone banking, events, and other campaign activities, according to Alaska Public Media.

Thousands march against Donald Trump in LGBT rights parade Show all 8 1 /8 Thousands march against Donald Trump in LGBT rights parade Thousands march against Donald Trump in LGBT rights parade A marcher hold a sign that reads "Love is Love is Love" on the National Mall with the Washington Monument in the background during the Equality March for Unity and Pride in Washington AP Thousands march against Donald Trump in LGBT rights parade Marchers unfurl a huge rainbow flag as they prepare to march in the Equality March for Unity and Pride in Washington AP Thousands march against Donald Trump in LGBT rights parade Marchers gather to hear speakers at the end of the Los Angeles LGBTQ #ResistMarch AP Thousands march against Donald Trump in LGBT rights parade Gil Mendez, of San Francisco, holds a sign to honor the victims of the shooting at the Pulse Nightclub in Orlando as he marches during the Equality March for Unity and Pride in Washington AP Thousands march against Donald Trump in LGBT rights parade An demonstrator looks on as LGBT members and their supporters take part of the Equality March for Unity AFP/Getty Images Thousands march against Donald Trump in LGBT rights parade A marcher listens to speakers at the end of the Los Angeles LGBTQ #ResistMarch AP Thousands march against Donald Trump in LGBT rights parade LGBT members and their supporters take part of the Equality March for Unity AFP/Getty Images Thousands march against Donald Trump in LGBT rights parade A marcher mugs for the camera during the Los Angeles LGBTQ #ResistMarch AP

Donations came from local supporters and national organisations like the American Civil Liberties Union, Freedom for All Americans, and Planned Parenthood of the Great Northwest and Hawaii. The fundraising haul dwarfed that of the “Yes” campaign, which raised $128,000.

Alaska is represented exclusively by Republicans in the US Congress, and went for Donald Trump by more than 51 per cent in the 2016 election. Anchorage, however, is represented by a Democratic mayor, who voiced his opposition to Prop 1 the day it qualified for the ballot.

North Carolina passed the first “bathroom bill” in the US in 2016, causing outcry from residents and the business community. The state legislature repealed the bill in 2017.