Arizona Gov. Jan Brewer

PHOENIX — Ending a day that cast a glaring national spotlight on Arizona, the state’s Republican governor, Jan Brewer, decided late Wednesday to veto a bill that would have given business owners the right to refuse service to gays and lesbians on religious grounds, The New York Times reported.

Her action came amid mounting pressure from across the spectrum, including members of the Republican establishment — Gov. Rick Scott of Florida, Mitt Romney and others — who sided with the bill’s opponents.

As Brewer deliberated, the state had already begun to lose business: The Hispanic National Bar Association canceled plans to hold its annual convention of 2,000 lawyers here next year because of the bill, saying in a statement, “It is imperative that we speak up and take immediate action in the presence of injustice.”

Outside the State Capitol on Wednesday, where Brewer spent the day in private meetings with supporters and opponents of the bill, protesters gathered, holding signs that read, “Civil rights trump religious wrongs.” Inside, television cameras stood guard by the entrance to the governor’s wing as volunteers from the Human Rights Campaign, a national gay rights advocacy group, hauled in boxes and boxes of petitions holding 63,000 signatures asking for a veto.

The measure is the latest initiative in Arizona to set off a political firestorm, not just in the state but around the country. The state is still struggling to repair its image and finances from the boycotts and bad publicity it endured after passage of a stern immigration law in 2010, which gave police officers the right to stop people whom they suspected of being in the country illegally and made it a crime for unauthorized immigrants to hold jobs.

Arizona also faced a boycott almost 20 years ago, after voters initially refused to recognize Martin Luther King’s Birthday as a state holiday. Back then, the state was set to host the Super Bowl, but the National Football League, looking to avoid the controversy, moved the game to Pasadena, Calif. Sports Illustrated reported on Wednesday that the National Football League was exploring a similar move for next year’s game, which was scheduled for Phoenix.

There was a palpable sense of anticipation on Wednesday; everyone — legislators, lobbyists, seasoned consultants — were waiting on the governor.

Calls for a veto from prominent Republicans — like Romney (“Veto of SB 1062,” as the bill has come to be known, “is right,” he posted) and Ari Fleischer (“If I were governor of Arizona, I would veto SB 1062.”) — appeared on Twitter, among the thousands of posts on the microblogging site. On NBC, Secretary of State John Kerry said, “I cannot imagine that law would withstand the scrutiny of the Supreme Court of the United States, so I would hope that she’ll make the right decision.”

Gov. Brewer’s Facebook page was also filled with comments, including many urging her to sign the legislation. “Don’t let them bully you, Jan,” read one. “If we deny someone their religious beliefs or the right to do business with whom they choose, we truly are giving up more and more, all of us, gay or straight.”

Brewer spent the day in her office, parsing the measure with her director of legislative affairs and other senior members of her staff, and then speaking to legislators and business leaders in person and by phone. One of them was Steve Pierce, a Republican state senator who voted for the measure, approved on Thursday on a 17-13 party line vote, and then regretted it, joining two colleagues in a letter to the governor urging her to reject the bill.

The governor is no stranger to controversial decisions, even if they put her on a collision course with longtime allies or members of her own party. She pushed a temporary sales-tax increase in 2010 to help offset some of the severe cuts to public education during the recession and the expansion of Medicaid last year, despite vociferous protests from Republicans in Arizona and in Washington. Both times, her arguments were financial and this time, she had a similar cover to justify a veto, given the opposition the measure has faced in the business community.

Several executives, including one from Apple, which plans to build a manufacturing plant in Mesa, had also called Brewer to urge a veto. Barry Broome, president and chief executive of the Greater Phoenix Economic Council, said that leaders of four companies looking to relocate to Arizona had put his organization on notice, saying they might reconsider if the bill became law.

A report released about seven months after passage of the controversial immigration crackdown in 2010 said the subsequent boycott had cost the state more than $140 million in lost meeting and convention business. After the NFL moved the Super Bowl in 1993, Arizona officials said the state lost $150 million. It lost another $190 million in canceled conventions. (Voters later passed a measure calling for a King holiday.)

Similar religious protection legislation has been introduced in several states, including Georgia, Idaho, Ohio, Oklahoma and South Dakota. Arizona’s plan is the only one that has passed.