A federal appeals court ruled on Wednesday that the Pentagon may temporarily reinstate a ban on openly gay men and women in uniform while a lengthier stay in favor of the “don’t ask, don’t tell” policy is considered.

The ruling by the 9th U.S. Circuit Court of Appeals in San Francisco added to the disarray surrounding a landmark legal battle that already has forced the U.S. military to welcome openly gay recruits for the first time.

Siding with the Obama administration, a three-judge appellate panel lifted an injunction issued last week by U.S. District Judge Virginia Phillips that barred further enforcement of a law requiring gay men and lesbians in the armed forces to keep their sexual orientation private.