President Obama signed the landmark repeal of the military's "don't ask, don't tell" policy Wednesday morning, handing a major victory to advocates of gay rights and fulfilling a campaign promise to do away with a practice that he has called discriminatory.

Casting the repeal in terms of past civil rights struggles, Obama said he was proud to sign a law that "will strengthen our national security and uphold the ideals that our fighting men and women risk their lives to defend."

In remarks before signing the repeal, he added: "No longer will our country be denied the service of thousands of patriotic Americans who are forced to leave the military - regardless of their skills, no matter their bravery or their zeal, no matter their years of exemplary performance - 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."

The signing does not immediately implement the repeal but instead begins the process of ending the ban on gays serving openly in the military.

The law will not actually change until the Pentagon certifies to Congress that the military has met several conditions, including education and training programs for the troops.

"In the coming days, we will begin the process laid out by this law" to implement the repeal, Obama said. Meanwhile, he cautioned, "the old policy remains in effect." But he pledged that all the service chiefs are "committed to implementing this change swiftly and efficiently," and he vowed, "We are not going to be dragging our feet to get this done."

Obama quoted Adm. Mike Mullen, chairman of the Joint Chiefs of Staff, as saying, "Our people sacrifice a lot for their country, including their lives. None of them should have to sacrifice their integrity as well." Obama continued: "That's why I believe this is the right thing to do for our military. That's why I believe it is the right thing to do, period."

He said, "We are not a nation that says 'don't ask, don't tell.' We are a nation that says, 'Out of many, we are one.' "

So many people wanted to witness the signing of the bill that the White House held the ceremony in the auditorium of Interior Department headquarters.

The guests at the ceremony included Joe Solmonese, head of the Human Rights Campaign, a gay rights group; Vice President Biden; Rep. John Conyers Jr. (D-Mich.); and Dan Choi, a former U.S. Army soldier who was discharged under "don't ask, don't tell" and was arrested in November after chaining himself to a White House fence to protest the policy.

Several other soldiers who have been discharged from military service because they are gay attended the ceremony as well.

Among the guests on the stage with Obama was Eric Alva, a former Marine staff sergeant who lost a leg in Iraq and who, following a medical discharge, has been working for the repeal of "don't ask, don't tell." Another participant was Navy Cmdr. Zoe Dunning, a repeal advocate who fought to remain in the Navy Reserves and ultimately retired in 2007 after 13 years of service as an openly gay officer.