Legislation to repeal “don’t ask, don’t tell” is now headed to President Barack Obama’s desk for signature after a historic vote in the U.S. Senate Saturday that seemed highly improbable just weeks earlier. In their second vote of the day, senators voted 65-31 Saturday afternoon to approve a stand-alone bill ending the military’s 17-year-old ban on lesbians and gays serving openly in the military.

The outcome of that vote was a foregone conclusion after the chamber surmounted a much greater hurdle that morning when senators voted 63-33 – overcoming a 60-vote threshold – to advance the bill. The U.S. House of Representatives passed the same piece of legislation earlier this week.

The vote was a major win for LGBT equality advocates but it was also seen as a win for the White House, which has been trying to mend its relationship with the progressive base that helped put Obama in office. White House aides, including Jim Messina, Valerie Jarrett, Brian Bond, Tina Tchen, and Shin Inouye watched the historic vote from inside the Senate gallery.

A senior White House official who spoke on the condition of anonymity called the scene at the Vice President’s office right near the Senate gallery “pandemonium” just after the first successful vote.

“The president called very thrilled,” said the official, adding that Obama “worked the phones” right up until the vote. “It was a significant win, and this is one that the president wanted very very much. This is one of the most significant civil rights votes in history.”

President Obama issued a statement saying it was "time to close this chapter" in the nation's history.

"It is time to recognize that sacrifice, valor and integrity are no more defined by sexual orientation than they are by race or gender, religion or creed," he said. "It is time to allow gay and lesbian Americans to serve their country openly."

The stand-alone bill was a last-ditch effort to pass repeal before the next Congress, when the bill would have almost surely been dead for two years with the House in Republican hands. House majority leader Steny Hoyer and Pennsylvania representative Patrick Murphy cosponsored the legislation in the House. Senators Joe Lieberman, Susan Collins, and Mark Udall were the Senate cosponsors.

Eight Republicans joined Democrats in the final vote to end the ban: senators Scott Brown, Susan Collins, Mark Kirk, Lisa Murkowski, Olympia Snowe, George Voinovich, John Ensign, and Richard Burr. Democratic senator Joe Manchin of West Virginia was absent for both votes.

Sen. Lieberman said from the floor that open service was not a liberal or conservative ideal, a Republican or Democratic ideal, but an American ideal.

“It’s time to right a wrong and put the military in line with the best of American values,” Lieberman said.

Sen. Ron Wyden, who was recently diagnosed with prostate cancer and is scheduled to undergo surgery early next week, said he felt an urgency to be present for the weekend vote.

“I don't care who you love — if you love this country enough to risk your life for it, you shouldn't have to hide who you are,” Wyden said from the floor.

In a final act of protest before the vote, Sen. John McCain called it “a very sad day” and imagined that a successful vote would lead to “high fives all over the liberal bastions of America.”

“I hope that when we pass this legislation,” McCain said, “that we will understand that we are doing great damage, and we could possibly, and probably, as the commandant of the Marine Corps said ... harm the battle effectiveness which is so vital to the survival of our young men and women in the military.”

Tags: World