Minutes into the vote, Sen. Kelly Ayotte of New Hampshire emerged to vote yes. Then the outcome rested with Sens. Rob Portman of Ohio, who announced earlier this year that his son was gay and he supported same-sex marriage, and Sen. Pat Toomey of Pennsylvania.
After extended discussions, Portman and Toomey emerged to vote yes.
"I have long believed that more legal protections are appropriate to prevent employment discrimination based on sexual orientation," Toomey said in a statement after the vote, in which he promised to offer an amendment to protect religious freedom.
The vote came as a stark reminder of the nation's changing views, lingering resistance to homosexuality and the political implications resonated in Maine, as six-term Democratic Rep. Mike Michaud, who is running for governor, said he was gay and questioned whether it still mattered to voters.
Hours before the vote, US President Barack Obama issued a fresh plea for passage of the Employment Non-Discrimination Act, the first significant gay rights bill since Congress lifted the ban on gays serving openly in the military nearly three years ago.
"Americans ought to be judged by one thing only in their workplaces: their ability to get their jobs done," the president said in a message written for Huffingtonpost.com. "Does it make a difference if the firefighter who rescues you is gay - or the accountant who does your taxes or the mechanic who fixes your car?"
The White House issued a statement after the procedural vote welcoming the results.
Seven Republicans joined all the members of the Democratic majority who voted for the measure. The three potential Republican presidential candidates - Marco Rubio of Florida, Ted Cruz of Texas and Rand Paul of Kentucky - voted against.
Sen. Dean Heller, R-Nev., announced his support on Monday, saying that the measure "raises the federal standards to match what we have come to expect in Nevada, which is that discrimination must not be tolerated under any circumstance".
Opening Senate debate, Majority Leader Harry Reid, D-Nev., quoted slain gay rights leader Harvey Milk, who argued that freedom and individual rights shouldn't hinge on political deals and opinion polls.
The law, Reid said, would ensure that "all Americans regardless of where they live can go to work unafraid to be who they are". Sen. Tom Harkin, D-Iowa., called the measure another step forward in the country's progress.
Sen. Mark Kirk, R-Ill., delivered his first speech on the Senate floor since suffering a stroke in January 2012. Seated at a desk, Kirk said it was especially important for an Illinois Republican to speak out for the legislation in the tradition of Everett Dirksen and Abraham Lincoln, two leaders on civil rights.
Sen. Tammy Baldwin, D-Wis., the first openly gay member of the Senate, praised the Republicans and Democrats united behind the bill.
"For those that stand up this week and answer the call for courage, I can say with confidence your courage will be respected and remembered when the history of this struggle is written," Baldwin said.
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.
Possible passage of the bill would cap a 17-year quest to secure Senate support for the anti-bias measure that failed by one vote in 1996, the same year Congress passed and President Bill Clinton signed the Defence of Marriage Act. That law required the federal government to refuse to recognise same-sex marriages.
Today Americans have shown increasing support for same-sex marriage, now legal in 14 states and the District of Columbia. The Supreme Court in June affirmed gay marriage and granted federal benefits to legally married same-sex couples.
Meanwhile, in Maine, Michaud wrote about his homosexuality.
"That may seem like a big announcement to some people. For me, it's just a part of who I am, as much as being a third-generation mill worker or a lifelong Mainer. One thing I do know is that it has nothing to do with my ability to lead the state of Maine," Michaud wrote in an op-ed article.
The anti-discrimination bill faces strong opposition from conservative groups - Heritage Action and the Faith and Freedom Coalition said the vote will be part of their legislative scorecard on lawmakers. More to its immediate prospects, the legislation is opposed by Speaker John Boehner, R-Ohio, and it's unclear whether the House will even vote on the measure.
Reiterating Boehner's longstanding opposition, spokesman Michael Steel said Monday that Boehner "believes this legislation will increase frivolous litigation and cost American jobs, especially small business jobs".
Besides Heller and Kirk, three other Republican senators are backing the legislation - Susan Collins of Maine, Hatch and Murkowski - and proponents expect a few others to support it.
Chad Griffin, president of the Human Rights Campaign, the largest gay and lesbian advocacy group, contrasted Heller's backing with Boehner's opposition.
"The speaker, of all people, should certainly know what it's like to go to work every day afraid of being fired," Griffin said, a reference to the unsuccessful, tea party-backed challenge to Boehner earlier this year.
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.
About 88 percent of Fortune 500 companies have adopted nondiscrimination policies that include sexual orientation, according to the Human Rights Campaign. About 57 percent of those companies include gender identity.
- AP