Gay rights activists and liberals were celebrating after a surprise Senate vote yesterday that will allow gay men and women to serve openly in the US military for the first time.
Democrats, supported by eight Republicans and two independents, voted by a higher-than-expected 65 to 31 in favour of repeal of the 'don't ask, don't tell' policy, the messy compromise introduced during the Clinton years.
One of the main campaign groups, the Servicemembers Legal Defence Network, described reform as the "defining civil rights initiative of this decade".
Opponents of the bill's repeal, such as the socially conservative Family Research Council, described the vote as "a tragic day for our armed forces".
Tony Perkins, the Family Research Council's president, said: "The American military exists for only one purpose â to fight and win wars. It has now been hijacked and turned into a tool for imposing on the country a radical social agenda."
The vote gives an unexpected end-of-year boost to Barack Obama, who campaigned in 2008 on a promise to repeal 'don't ask, don't tell', in which gay people could serve in the military as long as their sexual orientation remained secret.
Obama wrote on Twitter: "By ending 'don't ask, don't tell', no longer will patriotic Americans be asked to live a lie in order to serve the country they love." The White House said Obama will sign the bill into law this week.
The US now, belatedly, joins other western forces in allowing gay soldiers to serve openly. It will be several months before the new law takes effect.
It has long been an embarrassment to Democrats and liberals that the US, which portrays itself as socially progressive and a champion of human rights, still denies gay people equal rights in the military.
John Kerry, the Democratic chairman of the Senate foreign relations committee, said: "The military remains the great equaliser. Just like we did after President Truman desegregated the military, we'll someday look back and wonder what took Washington so long to fix it."
'Don't ask, don't tell' was introduced by Bill Clinton in 1993 as a fudge, a way to allow gay soldiers to serve in a military from which they had been explicitly banned. But serving gay soldiers were always at risk of being outed by comrades, senior officers and spurned lovers, or by a chance remark on Facebook, and more than 13,000 have been dismissed since 1993. Gay soldiers who were forced out of the military will now be able to re-enlist.
The likelihood of repeal any time soon appeared dead last week when it was lost in a bigger, composite bill on defence spending. Democrats, however, brought it back yesterday as a stand alone bill, and it went through easily, in spite of opposition from senior Republicans like John McCain.
McCain blamed the vote on liberals with no military experience imposing social change on the forces at a time of war. The military will do what is asked of them, he said, adding: "But don't think there won't be a great cost."
Since Obama became president, the defence secretary, Robert Gates, and senior figures in the armed forces, such as the chairman of the joint chiefs of staff, Admiral Mike Mullen, have come out in favour of allowing gay men and women to serve. A Pentagon survey of serving members published in November showed two-thirds either positive about serving alongside gay men and women, or neutral. Opposition was highest in the marines.