WASHINGTON - The Senate adopted stronger protections for religious institutions in a historic gay rights bill that secured the conditional support of a key Republican who was the party's presidential nominee in 2008.

On a quick, voice vote Wednesday, the Senate approved an amendment from Republican Sens. Rob Portman of Ohio and Kelly Ayotte of New Hampshire that would prevent federal, state and local governments from retaliating against religious groups that are exempt from the law. The overall bill would prohibit workplace discrimination against gay, bisexual and transgender Americans.

The vote set the stage for passage of the bill on Thursday when all 55 senators in the Democratic majority and a number of Republican senators are expected to back the measure.

Asked if he would vote for the bill, five-term Sen. John McCain, R-Ariz., who twice sought the presidency, said, "yes," then added in a brief interview, "if we get the amendments worked out."

McCain was a co-sponsor of the Portman-Ayotte amendment. The Senate plans to vote on Thursday on an amendment by Sen. Pat Toomey, R-Pa., to expand the number of groups that are covered under the religious exemption.

The Employment Non-Discrimination Act would prohibit workplace discrimination against gay, bisexual and transgender Americans and its Senate passage would be a major victory for gay rights advocates in a momentous year. The Supreme Court in June affirmed gay marriage and granted federal benefits to legally married same-sex couples. Illinois was on the verge of becoming the 15th state to legalize gay marriage along with the District of Columbia.

Although passage in the Senate is all but assured, the prospects in the House are dim as Speaker John Boehner, R-Ohio, has maintained his longstanding objections. He contends that the bill is unnecessary and could prove too expensive and litigious for businesses.

Proponents argue that the legislation would establish a federal mandate rather than patchwork laws in the states. Twenty-two states and the District of Columbia have approved laws banning workplace discrimination on the basis of sexual orientation, and 17 of those also prohibit employers from discriminating based on gender identity.

"I appreciate that the Employment Non-Discrimination Act is legislation that is important in terms of who we are, our values and making sure that people are only judged based on the quality of work in the workplace," Ayotte said. "I also appreciate that the legislation ... right now includes important protections for religious institutions."

Current federal law prohibits discrimination on the basis of sex, race and national origin. But it doesn't stop an employer from firing or refusing to hire workers because they are gay, lesbian, bisexual or transgender.

The bill would bar employers with 15 or more workers from using a person's sexual orientation or gender identity as the basis for making employment decisions, including hiring, firing, compensation or promotion. The bill would exempt religious institutions and the military.

Well into the third day of Senate debate, no opponent had spoken out on the Senate floor, a development that did not go unnoticed by one of the bill's chief sponsors, Sen. Susan Collins, R-Maine.