The U.S. government on Thursday asked a federal court to allow the "don't ask, don't tell" policy, which bans gays from serving the military openly, to stay in place during an appeal.
The Justice Department said it was applying "for an order staying the application of the court's entry of a permanent injunction in this case pending appeal."
The department's announcement came just two days after a federal judge issued an injunction to stop enforcing the military gay ban.
Virginia Phillips, federal judge of the U.S. District Court for the Central District of California, on Tuesday ordered the military "immediately to suspend and discontinue any investigation, or discharge, separation or other proceeding, that may have been commenced under the 'Don't Ask, Don't Tell' Act."
The ban, which was introduced as a compromise measure in 1993 by then-President Bill Clinton, prohibits homosexuals to serve openly in the military, and is a major contentious issue in U.S. politics.
The Pentagon said on Thursday that it will abide by the court's ruling while the administration is weighing an appeal.
"The Department (of Defense) will abide by the terms in the court's ruling, effective as of the time and date of the ruling," Pentagon spokesman Colonel David Lapan said in an e-mailed statement. "The U.S. government is contemplating whether to appeal and to seek a stay of the injunction."
The military bans on gays have drawn strong criticism from gay rights groups, which argue that the policy violates the rights of gay military members to free speech and open association.
President Barack Obama has committed to repeal the ban during his presidential campaign, and the Pentagon is now reviewing the effect a repeal would have on the troops.
Obama on Thursday reiterated his opposition to the military gay policy, but said it should be ended in an orderly way.
"This is not a question of whether the policy will end," Obama said at a town hall meeting of young adults. "This policy will end. It will end on my watch."
"I can't simply ignore laws that are out there. I have to work to make sure they are changed," he added.
Last month, U.S. Senate blocked the repeal of the military gay ban in a procedural vote, a major setback for gay rights proponents.