WASHINGTON — Reflecting Americans’ increasing acceptance of gays, the Senate on Thursday approved legislation that would bar workplace discrimination based on sexual orientation and gender identity.
Gay rights advocates hailed the bipartisan 64-32 vote as a historic step, although it could prove short-lived. A foe of the bill, Speaker John Boehner, Republican of Ohio, has signaled that the Republican-led House is unlikely to even vote on the measure. Senate proponents were looking for a way around that obstacle.
Seventeen years after a similar antidiscrimination measure failed by one vote in the Senate, 54 members of the Senate Democratic majority and 10 Republicans voted for the Employment Non-Discrimination Act. It is the first major gay rights bill since Congress repealed the ban on gays serving openly in the military three years ago.
All senators in New England backed the measure, which was pushed by Senator Susan Collins, Republican of Maine.
‘‘All Americans deserve a fair opportunity to pursue the American dream,’’ said Collins.
Proponents cast the effort as Congress following the lead of business and localities. About 90 percent of Fortune 500 companies and 22 states have outlawed employment discrimination against gay, bisexual, and transgender Americans.
Supporters described it as the final step in a long congressional fight against discrimination, coming nearly 50 years after enactment of the Civil Rights Act and 23 years after the Americans with Disabilities Act.
‘‘Now we’ve finished the trilogy,’’ said Senator Tom Harkin, Democrat of Iowa and a chief sponsor of the disabilities law, at a Capitol Hill news conference.
Two Republican senators who voted against antidiscrimination legislation in 1996, Arizona’s John McCain, the presidential nominee in 2008, and Orrin Hatch of Utah, backed the measure this time. Alaska Republican Senator Lisa Murkowski voted in favor; her father, Frank, opposed a similar bill nearly two decades ago, underscoring the generational shift.
‘‘Let the bells of freedom ring,’’ said Senator Jeff Merkley, Democrat of Oregon, who took the lead on the legislation from the late Senator Edward M. Kennedy of Massachusetts.
Senate passage came in a momentous year for gay rights advocates. The Supreme Court in June granted federal benefits to legally married same-sex couples, though it avoided a sweeping ruling that would have paved the way for same-sex unions nationwide. Illinois is on the verge of becoming the 15th state to legalize gay marriage along with the District of Columbia.
A Pew Research survey in June found that more Americans — 60 percent to 31 percent — said homosexuality should be accepted rather than discouraged by society. Opinions were more evenly divided 10 years ago.
In the House, Boehner has maintained his longstanding opposition despite pleas from national Republicans for the GOP to broaden its appeal to a fast-changing demographic. Boehner argues that the bill is unnecessary and would touch off costly, meritless lawsuits for businesses.
President Obama and Democrats used the progressive legislation piling up in the House as a cudgel on the GOP, with the gay rights bill likely to join the stalled measure to overhaul the immigration system.
Senator Chuck Schumer, Democrat of New York, said that if the House fails to act, ‘‘they’ll be sending their party straight to oblivion.’’
Obama, in a statement, said ‘‘one party in one house of Congress should not stand in the way of millions of Americans who want to go to work each day and simply be judged by the job they do.’’
Gay rights advocates reminded Obama that he could unilaterally issue an executive order barring antigay workplace discrimination by federal contractors. Chad Griffin, the president of the Human Rights Campaign, said Obama is empowered to act and called on him to sign the order.
One possible option exists for proponents: adding the gay rights bill to the annual defense policy measure that the Senate will consider later this month and force the House to vote on it.
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.