Image caption It has been a big year for gay rights supporters, who rallied in June after the high court struck down a law banning federal recognition of same-sex marriage

A bill banning workplace discrimination against gay and transgender people has passed a critical test of support in the US Senate, 17 years after a similar bill failed by a single vote.

The Democratic-led Senate voted 61-30 to open debate on the legislation, with several Republicans backing it.

The bill is expected to win final Senate passage as early as this week.

The White House strongly supports the measure, but its future in the Republican-led House remains unclear.

The Senate rejected comparable legislation by one vote in 1996.

Americans ought to be judged by one thing only in their workplaces: their ability to get their jobs done Barack Obama, US President

But on Monday, the Employment Non-Discrimination Act, or Enda, received bipartisan support and reached the 60-vote threshold necessary to overcome a procedural roadblock set up by Republican opponents.

'Make a difference'

In the House of Representatives, Speaker John Boehner, a Republican, has voiced opposition to the bill, saying it could lead to lawsuits and hinder job creation.

The proposed legislation bars employers with 15 or more workers from making employment decisions - hiring, firing or compensation - based on sexual orientation or gender identity.

President Barack Obama has publicly voiced his support for the measure, three years after Congress lifted the ban on gays serving openly in the US military, and months after the US Supreme Court struck down a federal law banning federal recognition of same-sex marriage.

"Americans ought to be judged by one thing only in their workplaces: their ability to get their jobs done,'' Mr Obama told the Huffington Post.

"Does it make a difference if the fire-fighter who rescues you is gay, or the accountant who does your taxes or the mechanic who fixes your car?"