Come September, President Barack Obama has promised, the military's ban on gays serving openly in the US forces will end. The nation, he certified, is ready to accept them among its defence ranks.
"Today, we have taken the final major step toward ending the discriminatory 'Don't Ask, Don't Tell' law that undermines our military readiness and violates American principles of fairness and equality," Obama said in a statement.
He spoke after signing certification with Defense Secretary Leon Panetta and the top US military officer, Chairman of the Joint Chiefs of Staff Admiral Mike Mullen, that the US military was ready to accept gay troops.
The repeal of the ban will now come into force in 60 days' time, on September 20.
"Don't Ask, Don't Tell" was overturned in a law adopted in December that first required the top military officer, the defense secretary and the president -- who is also commander-in-chief -- to certify the change would not harm military readiness and that the armed forces were ready to carry it out.
In the interim, the Pentagon has drawn up new manuals and prepared the entire armed forces, some 2.3 million people who serve as both active troops and reservists, for the new policy.
"As of September 20th, service members will no longer be forced to hide who they are in order to serve our country," Obama said.
"Our military will no longer be deprived of the talents and skills of patriotic Americans just because they happen to be gay or lesbian."
Panetta said the Pentagon had "taken the time necessary to get this done right and to ensure that service members are properly trained for a change that I believe is essential to the effectiveness of our all-volunteer force."
The decision was taken after the military service chiefs, service secretaries and all the combatant commanders stated that "the force is prepared for this change," the Pentagon leader added.
Former soldiers and gay rights groups have fought for years to overturn the ban, introduced in 1993 as a compromise after military chiefs rejected a bid by former president Bill Clinton to open the doors to gay soldiers.
"Don't Ask, Don't Tell" required gay troops to keep quiet about their sexual orientation or face expulsion from the forces, and an estimated 14,000 service members have been kicked out of the military under the rule.
The issue stirred a passionate debate, with some US lawmakers, mostly Republicans, as well as high-ranking officers such as Marines Corps Commandant General James Amos fearing it would harm efficiency on the battlefield.
House Armed Services Committee Chairman Buck McKeon said Obama had not taken seriously concerns "that the combat readiness of our force could be placed at risk, particularly those serving on the front lines in Afghanistan and Iraq."
And he urged the administration to release the assessments on the impact of the ban's repeal.
But rights groups hailed the move.
"The days of 'Don't Ask, Don't Tell' are quite literally numbered," said Laura Murphy, director of the American Civil Liberties Union Washington Legislative Office.
"Very soon, gay and lesbian service members will be able to serve their country openly, honestly and with the dignity they deserve and for far too long were denied."
Most of Washington's NATO allies have already lifted bans on openly gay troops and experienced no serious problems as a result.
A review carried out by the Pentagon showed that 70 percent of 115,000 soldiers and 44,000 military spouses were in favor of repealing the ban.
But among Marines and certain battle units, the figures were reversed with 40 to 60 percent of those surveyed being against an end to the ban.
Come September 20, those people who have been kicked out of the military for being gay can rejoin the ranks if they wish.
But some gay activists says more changes are still needed. The partners of gay troops will not be allowed to live on military bases and will not enjoy the benefits of the military's medical coverage.
Gay marriage is so far only recognized in six states -- Connecticut, Iowa, Massachusetts, New Hampshire, Vermont and New York -- and is not legal under federal laws.
The so-called Defense of Marriage Act only recognizes marriage as the union between a man and a woman.