The US Senate stood poised to pass a historic gay rights bill Thursday, one that would prohibit companies from hiring and firing based on an employee's sexual orientation or gender identity.

Supporters hail the Employment Non-Discrimination Act (ENDA) as one of the most important civil rights legislation in years, while conservative opponents decry what they interpret as "a dagger" in the heart of religious freedom.

But longstanding opposition within the chamber eased dramatically over the past week, as the legislation passed key procedural hurdles and the senators unanimously approved a Republican amendment that protects religious groups exempted under the legislation.

"I do hope and expect a bipartisan vote, a good one, to extend safeguards (on sexual orientation and gender identity) to every American," Senate Majority Leader Harry Reid said on the Senate floor hours before what is expected to be a vote on final passage.

But the bill is currently a dead letter in the Republican-controlled House of Representatives, where Speaker John Boehner has said such a measure would hurt business.

"I hope Speaker Boehner will reconsider his decision to not bring this up for a vote," Reid said.

But even while most Americans believe such discrimination is illegal, it is actually legal in more than two dozen states -- home to 76 million US workers -- to discriminate against LGBT employees.

"That is simply wrong and this legislation seeks to right this wrong," said Senate Democrat Tammy Baldwin, the chamber's first openly gay senator.

A leading family and religious freedom activist, Ralph Reed of the Faith and Freedom Coalition, blasted ENDA as "dumb politics" that criminalizes actions based on the "subjective criteria of sexual orientation and gender identity."

"It is also a dagger aimed at the heart of religious freedom for millions of Americans," Reed said in an op-ed in USA Today newspaper, arguing the bill's religious exemptions are vague and "inadequate."

But ENDA, which was narrowly defeated in the Senate in the 1990s, received a major boost when Republican Senators Rob Portman and Kelly Ayotte backed the measure and added their amendment clarifying the protection of religious groups from government retaliation.

"People should be judged by their experience, their qualifications and their job performance, and not by their sexual orientation. Someone should not be fired just because he or she is gay," Portman said Wednesday.

Senator Pat Toomey introduced an amendment that would expand the number of groups that could be exempted from the ban, to include organizations managed by or affiliated to a church or religious group.

Toomey's measure gets a vote Thursday but there did not appear to be sufficient support to reach the 60-vote threshold.

Current federal law bars discrimination based on race, ethnicity, religious affiliation, gender and age, but it does not protect against discrimination based on sexual orientation and gender identity.

ENDA would be the latest in a series of victories for gay rights.

In June, the US Supreme Court struck down the Defense of Marriage Act, which defined marriage as between one man and one woman.