A federal appeals court in California on Friday agreed to allow the military to temporarily continue “Don't Ask, Don't Tell,” the policy that bans gay and lesbian troops from serving openly, the AP reported.

But even as it agreed to reverse its July 6 order, the Ninth Circuit Court of Appeals in San Francisco placed a restriction on the policy: the Pentagon is not allowed to discharge any service member who is openly gay.

The move comes in response to an emergency motion filed Thursday by the Obama administration asking the court to reconsider its ruling that ordered the military to halt enforcement of the gay ban.

The court said it was acting based on new information provided by the government.

Last September, U.S. District Judge Virginia A. Phillips ruled that the military's policy has a “direct and deleterious effect” on the armed services and ordered an immediate halt. The appeals court had placed the order on hold until last week, when it reversed course.

Lawmakers last December agreed to repeal the 1993 law, but the policy remains in effect until 60 days after top Pentagon leaders and President Barack Obama certify that the military has been properly trained for the change.

The Obama administration said it had filed the motion to “avoid short-circuiting the repeal process established by Congress during the final stages of the implementation of repeal.”

Friday's ruling suggests the military is very close to certifying repeal.