Anchorage, Alaska Mayor Dan Sullivan vetoed a gay protections bill on Monday, NBC affiliate KTUU reported.

City leaders passed the measure that bans discrimination on the basis of sexual orientation and gender identity (transgender protections) in the areas of employment, housing and credit by a 7 to 4 vote last week. The ordinance exempted religious organizations from the regulations.

An override of the mayor's veto would require 8 votes.

Final passage came after months of debate and numerous revisions. One draft turned the bill on its head, allowing discrimination based on sexual orientation, while protecting other classes.

Hundreds of opponents piled in to testify against the bill in June, stalling lawmakers from voting on the measure until after Republican Mayor Sullivan was installed on July 1. Most objected to the measure on religious grounds.

Sarah Erkmann, the mayor's spokeswoman, said on Sunday that he had been “inundated” with emails and phone calls about the measure.

The mayor announced his decision in a press release, and declined interviews on Monday.