President Obama has hailed the end of the ban on openly gay troops.

The 1993 law was repealed today and the president said: “As of today, patriotic Americans in uniform will no longer have to lie about who they are in order to serve the country they love.”

In the past, gay and lesbian troops have had to lie about their private lives or face dismissal.

Congress voted last year to repeal the law and a repeal process has slowly progressed.

Obama said: “Our armed forces have been both a mirror and a catalyst of that progress, and our troops, including gays and lesbians, have given their lives to defend the freedoms and liberties that we cherish as Americans.

“Today, every American can be proud that we have taken another great step towards keeping our military the finest in the world and towards fulfilling our nation’s founding ideals,” the president added.

The Pentagon sent out a memo reminding troops to treat colleagues “with dignity”.

Clifford Stanley, the under-secretary of defence for personnel and readiness, wrote: “Effective today, statements about sexual orientation or lawful acts of homosexual conduct will not be considered as a bar to military service.

“All service members are to treat one another with dignity and respect regardless of sexual orientation.”

He added that “harassment or abuse based on sexual orientation” would not be tolerated.