On Friday, President Obama and two military leaders signed a certification declaring that lifting the ban on openly gay troops will not harm the military.

This means that the ban. known as Don’t Ask, Don’t Tell, will officially end in mid-September, allowing gay and lesbian troops to finally be open about their sexual orientation.

In a statement, the president said: “As of Sept 20th, service members will no longer be forced to hide who they are in order to serve our country.

“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.”

He added: “Our military will no longer be deprived of the talents and skills of patriotic Americans just because they happen to be gay or lesbian.”

Mr Obama promised to repeal the 17-year-old law in his 2008 election campaign.

He met with stiff opposition from some military leaders, while some gay rights campaigners accused him of not moving fast enough.

Some critics argued that repealing the law would be a dangerous distraction while the military is busy fighting wars in Iraq and Afghanistan. However, intensive research led military chiefs to conclude that readiness would not be affected by the change.

More than 13,500 troops have been dismissed under the law.