Arizona Gov. Jan Brewer (R) vetoed a controversial bill Wednesday that would have allowed businesses in the state to deny service to gays and lesbians if they felt that serving them would violate their religious rights.

Gay rights advocates had denounced the legislation, labeling it a form of legalized discrimination, and Arizona’s two GOP senators and leading Republican candidates for governor had urged Brewer to veto the bill. Several GOP state legislators who had voted for the measure last week have said since then that it was not the right thing to do.

In an evening appearance before reporters in Phoenix, Brewer said the bill “does not address a specific or pressing concern” and is not part of her agenda.

“I have not heard of one example in Arizona where business owners’ religious liberty has been violated,” Brewer said. “The bill is broadly worded and could result in unintended and negative consequences.”

Brewer told the bill’s supporters that she understands their desire to protect religious liberty but that the bill had the potential to cause more problems than it would solve.

The legislation was passed last week in response to a ruling by the New Mexico state Supreme Court against a wedding photographer who declined to work for a couple’s same-sex wedding.

Supporters of the bill say it was narrowly tailored and would have helped clear up an ambiguity in the state’s law.

“This measure should have been a political no-brainer and only went down because people either chose to ignore the plain language of the bill or refused to read it altogether,” said Tony Perkins, head of the conservative Family Research Council. “This bill . . . bars government discrimination against religious exercise, so by vetoing this bill, Gov. Brewer is saying she supports government discrimination against people’s religious freedoms.”

But Chad Griffin, head of the gay rights group Human Rights Campaign, said that Brewer’s veto “spared her state from institutional discrimination and economic catastrophe.”

Among the strongest opponents of the bill were Arizona businesses; they worried that it could cost them customers. Some big-name companies, including Apple and American Airlines, publicly opposed the bill.

The state lost the ability to host the Super Bowl in the early 1990s after it declined to celebrate Martin Luther King Jr. Day. It is set to host the 2015 Super Bowl, and the game’s host committee spoke out against the law on Monday.

The bill passed through the GOP-controlled state legislature quickly last week, with the state Senate voting for it 17 to 13 and the state House approving it 33 to 27. All but three Republicans, on the House side, voted in favor.

Arizona residents cheered Gov. Jan Brewer's veto of a controversial bill that would have allowed businesses to cite religious reasons as grounds for not serving gays. (Reuters)

The measure was the latest in a long line of controversial pieces of legislation in Arizona, which favored Republican Mitt Romney by nine points in 2012 and has long been a national incubator for conservative policies.

In recent years, the state was the first to pass a restrictive immigration law, which other states have since emulated and part of which was struck down by the U.S. Supreme Court. It also passed legislation requiring presidential candidates to show proof of citizenship in order to appear on the state’s ballot, a measure Brewer vetoed.

Earlier this year, the state’s Republican Party voted to censure Sen. John McCain (R-Ariz.) for what it labeled his “liberal” voting record. McCain was among those praising Brewer for her veto Wednesday.

“I appreciate the decision made by Governor Brewer to veto this legislation,” he said in a statement. “I hope that we can now move on from this controversy and assure the American people that everyone is welcome to live, work and enjoy our beautiful State of Arizona.”

Brewer told supporters of the legislation that she understood that “long-held norms about marriage and family are being challenged as never before.”

“Our society is undergoing many dramatic changes,” Brewer said. But she added that the bill “has the potential to create more problems than it purports to solve. It could divide Arizona in ways we cannot even imagine, and no one would ever want.”