Updated

The Senate approved a bill Thursday outlawing workplace discrimination against gay, bisexual and transgender Americans.

The bill, which passed by a vote of 64-32, will now go to the Republican-controlled House where it faces an uphill battle and may not even come up for a vote.  House Speaker John Boehner has said he opposes the legislation..

All 55 members of the Democratic majority in the Senate voted in favor of the bill.

Gay rights advocates hailed Senate passage as a major victory in a year of significant change.

The Supreme Court in June affirmed gay marriage and granted federal benefits to legally married same-sex couples. Illinois is on the verge of becoming the 15th state to legalize gay marriage along with the District of Columbia.

"It is time for Congress to pass a federal law that ensures all our citizens - regardless of where they live - can go to work unafraid to be who they are," said Senate Majority Leader Harry Reid, D-Nev., who urged Boehner, R-Ohio, to reconsider his opposition.

The enthusiasm of the bill's supporters was tempered by the reality that the Republican-led House, where conservatives have a firm grip on the agenda, is unlikely to even vote on the legislation.

Boehner has maintained his longstanding opposition to the measure, arguing that it is unnecessary and certain to create costly, frivolous lawsuits for businesses. Outside conservative groups have cast the bill as anti-family.

In the Senate, opponents of the legislation remained silent through three days of debate, with no lawmaker speaking out. That changed on Thursday when Republican Sen. Dan Coats of Indiana said the legislation would force employers to violate their religious beliefs, a direct counter to rights embodied in the Constitution.

"There's two types of discrimination here we're dealing with, and one of those goes to the very fundamental right granted to every American through our Constitution, a cherished value of freedom of expression and religion," Coats said.

The Senate rejected an amendment sponsored by Republican Sen. Pat Toomey of Pennsylvania that would have expanded the number of groups that are covered under the religious exemption. Opponents argued that it would undermine the core bill.

If the House fails to act on the bill, gay rights advocates are likely to press President Barack Obama to act unilaterally and issue an executive order barring anti-gay workplace discrimination by federal contractors.

The Associated Press contributed to this report.