FAIRBANKS — The city of Fairbanks has passed sweeping new equal rights protections for the LGBTQ community and others.

The Fairbanks City Council this week approved an ordinance that extends anti-discrimination protections for employment, housing and public accommodations to people based on sexual orientation and gender identity, the Fairbanks Daily News-Miner reported.

The measure also provides a means for people to challenge in court the practices they believe are discriminatory.

"We've crafted something that's not perfect for any of us, but I think will do well for the city," Councilwoman Kathryn Ottersten said after the vote at Monday night's meeting.

The topic was contentious. Members of the public began signing up to comment at 10:30 a.m. for the evening meeting.

The council chambers filled to capacity of 103 people, and others listened by live stream from hallways on both floors of City Hall. Three extra officers from the Fairbanks Police Department were on hand for crowd control.

Approximately 35 people testified, with a small majority voicing opposition.

Ottersten unsuccessfully tried to remove two possible exemptions of the Federal Fair Housing Act, including one known informally known as "Mrs. Murphy's Exemption." It allows people to deny housing in residences up to a four-plex if the owner occupies one of the apartments.

Mayor Jim Matherly broke a tie and voted to keep the exemption.

With Matherly again breaking a tie, the council adopted dress code language. The measure states that employers "may establish dress code policies that are consistently used for all employees." Opponents said the language could be used as a loophole for discrimination.

The council also adopted language that allows a hiring exemption for religious corporations, associations, educational institutions or societies.

Businesses with three or fewer employees will be exempt from the law.

Councilmen Jerry Cleworth and David Pruhs voted against ordinance. Cleworth supported language that would have required aggrieved individuals to seek recourse through the Equal Employment Opportunity Commission or the Alaska Human Rights Commission before filing a lawsuit.