'Don't ask, don't tell' defenders were doomed to lose
There are still many Americans who do not want openly gay men and women serving in the military.
Some of them work in Congress. For the past year they have fought tooth-and-nail to keep the "don't ask, don't tell" that forces gay people in the armed forces to conceal their sexuality.
Defence spending bills have been filibustered off the floor simply because they contained provisions to repeal the law.
But it was a losing battle.'Right thing to do'
Attitudes to homosexuality have changed since the controversial policy was introduced under President Bill Clinton 17 years ago.
Polls conducted within the military, and society at large, consistently show that people are far less troubled by the issue of sexuality than they once were.
For President Barack Obama it became a matter of credibility.
He promised during the 2008 election campaign to end "don't ask, don't tell", not just because it seemed to be in line with public sentiment, but because he believed it was the right thing to do.
Supporters of repeal portrayed it as a 21st Century civil-rights issue - on a par with earlier struggles by women and black Americans.
They pointed to about 13,000 military personnel dismissed under the policy since 1993.Leeway for Pentagon
Their cause was bolstered when senior military figures joined the campaign - among them the Chairman of the Joint Chiefs of Staff, Adm Mike Mullen, and Gen David Petraeus, the commander of US forces in Afghanistan.
With a few exceptions, the issue divided Congress along party lines.
Conservative Republicans were often portrayed as prejudiced and out-of-touch for their staunch opposition.
However, many genuinely believed that there were matters of national security and troop safety at stake.
They argued that change may well be inevitable, but introducing it in the midst of two wars - in Iraq and Afghanistan - was an unnecessary burden on the military.
Congress was almost left out of the debate altogether in October 2010 when a legal challenge in California temporarily overturned "don't ask, don't tell".
It was an appeal by the US government that reinstated it. At the time, President Obama said he would rather repeal came through Congress than the courts.
They finally got that on their third attempt at a Senate vote. A handful of moderate Republicans crossed the floor to support the bill.
The time scale for phasing out "don't ask, don't tell" is not immediately clear, however the Pentagon is likely to be given some leeway to implement the new policy.'New wave'
For President Obama, the decision should have a positive effect.
Along with delivering health care reform, the scrapping of "don't ask, don't tell" is one of his most tangible achievements.
But having taken what he described as a "shellacking" in the mid-term elections, continuing to deliver "change" is only going to get tougher.
The current "lame-duck" session of Congress was the Democrats' best chance to push through their pet legislation.
In January, a new wave of Republican Senators and Representatives will arrive in Washington and they are not coming to help the president.