Fulfilling a campaign promise, President Obama signed the repeal Wednesday of the longstanding policy banning gays from serving openly in the military, capping off a yearlong legislative push that just weeks ago seemed in danger of collapsing. 

Obama said he was "overwhelmed" before putting his name to the law rescinding the 1993 policy known as "don't ask, don't tell." He said the decision would ultimately strengthen national security, downplaying the controversy that for years kept the policy stuck in neutral and predicting future generations would look back at the reversal and wonder what the fuss was about. 

"No longer will our country be denied the service of thousands of patriotic Americans who were forced to leave the military ... because they happen to be gay. No longer will tens of thousands of Americans in uniform be asked to live a lie or look over their shoulder in order to serve the country that they love," Obama said. The jubilant crowd shouted "yes we can," Obama's campaign slogan, as he walked to the podium. 

"Our people sacrificed a lot for their country, including their lives," the president said. "None of them should have to sacrifice their integrity as well." 

In signing the bill, the president was fulfilling a pivotal campaign promise that for the better part of his first two years seemed sidelined, as Congress debated massive legislative packages over health care and financial regulation and taxes. 

But Obama stressed Wednesday that ending "don't ask, don't tell" was a priority. He said it came up in the first meeting he ever held as president with Defense Secretary Robert Gates and Adm. Mike Mullen, chairman of the Joint Chiefs of Staff -- both of whom endorsed the repeal. 

Other military service chiefs, particularly the Marines commandant, had spoken out recently against a repeal at this stage, warning that it could harm unit cohesion, in turn putting troops in greater danger. They expressed concern that based on the results of a military survey, some members of the Armed Forces were still uncomfortable with the idea of serving alongside openly gay troops. 

But Gates and Mullen downplayed those concerns, pushing for swift congressional action following a yearlong Pentagon review. After the repeal push faltered earlier this month, the Senate approved a stand-alone bill Saturday to end the policy, established during the Clinton administration. 

Obama said the service chiefs have since committed to implementing the change "swiftly and efficiently." Under the bill, the chiefs have to complete implementation plans before carrying out the repeal. 

"We are not going to be dragging our feet to get this done," Obama said. He said he hopes those members discharged under "don't ask, don't tell" would seek to re-enlist in the military.