Gay rights groups have said they are disappointed that legislation to override the ban is likely to languish in Congress until next year, when Democrats could have fewer seats and less power to override Republican objections.
Defense Secretary Robert Gates and Joint Chiefs of Staff Chairman Mike Mullen, the military's top uniformed officer, have supported lifting the ban on gays serving openly. But Gates and Mullen also have warned that they would prefer to move slowly.
Meantime, despite a federal judge's ruling in San Diego on Tuesday, the battle in the courts over gays in the military may be far from over.
The Justice Department's first response may well be another trip to the courtroom of U.S. District Judge Virginia Phillips in San Diego to seek a stay, or temporary freeze, of her ruling. If Phillips turns down the request, the Justice Department will likely turn to the federal appeals court in California.
It was unclear whether Phillips' injunction against the 17-year-old policy on gays in the military would affect any ongoing cases.
Pentagon spokesman Geoff Morrell, traveling with Gates in Hanoi, Vietnam, said, "We have just learned of the ruling and are now studying it. We will be in consultation with the Department of Justice about how best to proceed."
If the government does not appeal, the injunction cannot be reversed and would remain in effect. If it does appeal, that would put the administration in the position of continuing to defend a law it opposes.
With so much uncertainty, it also was unclear whether the ruling would have any immediate effect on the midterm election campaigns that so far have focused far more on economic than national security issues.
Gay rights groups warned gay troops not to disclose their identity for now. Aaron Tax, the legal director for the Servicemembers Legal Defense Network, said he expects the Justice Department to appeal the case to the U.S. 9th Circuit Court of Appeals.
"Service members must proceed safely and should not come out at this time," Tax said in a statement.
Gates, a Republican, and Mullen face disagreement among the most senior general officers on whether lifting the ban would cause serious disruption at a time when troops are fighting in Afghanistan and winding down a long battle in Iraq.
For example, the incoming Marine commandant, Gen. Joseph Amos, and his predecessor, Gen. James Conway, both have told Congress that they think most Marines would be uncomfortable with the change and that the current policy works.
In part to resolve the question of how the troops feel, Gates has ordered a study due Dec. 1 that includes a survey of troops and their families.
Mr. Obama agreed to the Pentagon study. Mr. Obama also worked with Democrats to write a bill that would have lifted the ban, pending completion of the Defense Department review and certification from the military that troop morale wouldn't suffer. That legislation passed the House but was blocked in the Senate by Republicans.
Democrats could revive the legislation in Congress' lame-duck session after the Nov. 2 elections.
Family Research Council President Tony Perkins accused Phillips of "playing politics" with national defense.
"Once again, an activist federal judge is using the military to advance a liberal social agenda, disregarding the views of all four military service chiefs and the constitutional role of Congress," he said.
Perkins urged the Justice Department "to fulfill its obligation to defend the law vigorously through the appeals process" and said "Congress should make clear that it will not tolerate this judicial activism."
Gates has said the purpose of his study isn't to determine whether to change the "don't ask, don't tell" law, which is something he says is probably inevitable but for Congress to decide. Instead, the study is intended to determine how to end the policy without causing serious disruption.
Coming just three weeks before voters go to the polls, Tuesday's ruling seemed unlikely to force a final weeks' change of strategy or message as candidates pounded home their plans to help put back to work the 15 million Americans lacking jobs.
Polls suggest the economy is driving voters' choices, pushing national security and social issues down on their list of concerns.