President Obama has signed a bill to end the ban on openly gay troops in the US military.

Two years after he promised to end the controversial policy in his election campaign, the president signed the bill during a ceremony at the Interior Department.

Today, he said that the change would “strengthen our national security and uphold the ideals that our fighting men and women risk their lives to defend”.

Referring to the sacrifices made by servicemembers, he said: “None of them should have to sacrifice their integrity as well.”

An estimated 14,000 troops have been dismissed under the 1993 ban.

Last weekend, the Senate voted to repeal the bill.

However, it may take months before gay soldiers are permitted to serve openly and those fired can re-apply to join the military.

Military officials must consider and rewrite policies related to the issue over the next few weeks.

Then, President Obama, Defence Secretary Robert Gates and Joint Chiefs Chairman Adm. Mike Mullen must certify that the ban can be lifted without damaging the military.

Following this certification, 60 days must pass before repeal officially takes place.