PHOENIX — As the Arizona Legislature sent a bill to her desk Monday that would grant business owners the right to invoke religion to refuse service to gays and others, Gov. Jan Brewer, a Republican, faced pressure from many corners to veto the measure, which has cast unwanted national attention on Arizona.

Elected officials, civic leaders and business groups spoke out publicly against the measure, which passed both houses of the Legislature on Thursday.

On Twitter, Arizona’s United States senators, John McCain and Jeff Flake, also Republicans, had nearly identical posts, with both of them saying they hoped Ms. Brewer would veto the bill. An executive from Apple Inc., which plans to build a big manufacturing plant in Mesa, called Ms. Brewer to urge her to reject it, and W. Douglas Parker, chairman and chief executive of American Airlines, sent her a letter citing the state’s “economic comeback” and saying, “There is genuine concern throughout the business community that this bill, if signed into law, would jeopardize all that has been accomplished so far.”

Their calls were echoed by three Republican state senators — Adam Driggs, Steve Pierce and Bob Worsley, all members of the party’s conservative camp — who had helped pass the legislation in the first place. “While our sincere intent in voting for this bill was to create a shield for all citizens’ religious liberties, the bill has instead been mischaracterized by its opponents as a sword of religious intolerance,” the senators said in a letter to Ms. Brewer, adding that the matter was “causing our state immeasurable harm.”