SAN FRANCISCO (Reuters) - 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.

A participant waves a flag during a gay rights demonstration in Washington October 11, 2009. REUTERS/Molly Riley

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.

She refused on Tuesday to lift her own injunction, prompting the administration to petition the appeals court.

Her injunction will now be suspended while the 9th Circuit considers the administration’s request for a longer-term stay to remain in effect during the government’s overall appeal.

A 9th Circuit ruling on a full-blown stay pending appeal is expected after lawyers for the Log Cabin Republicans, the gay rights group challenging the ban, files its response to that motion in court in the next 10 days.

The group’s lead attorney in the case, Dan Woods, called the one-page order from the appeals court a minor setback and said he expected to ultimately prevail in the case.

The emergency stay came as some gay veterans expelled under the “don’t ask, don’t tell” policy have sought to re-enlist in a test of the lower-court decision.

The Obama administration insists it supports ending the ban but prefers a political rather than court-imposed remedy, and has urged the courts to give the military more time to make the transition on its own.

Phillips ruled in September that the military’s 17-year-old policy infringes on the constitutional free-speech and due-process rights of gay men and women in the armed forces.

She put that opinion into effect on October 12 with a blanket injunction requiring the military to stop enforcing the ban and halt pending investigations and discharges stemming from it.

NEXT STEP IN THE BATTLE

In a sign that the military was abiding by her ruling, the Defense Department said on Tuesday that it had directed its recruiters for the first time to start accepting applications from enlistees who acknowledge they are gay.

Still, the Pentagon has warned that gay service members who reveal their sexual orientation in the midst of the continued legal wrangling run the risk of facing expulsion later if Phillips’ ruling is reversed.

If the 9th Circuit ends up denying the administration a longer-term stay, the government is expected to petition the U.S. Supreme Court for review.

In its request before the 9th Circuit, the administration argued that Phillips’ injunction “risks causing significant immediate harm to the military and its efforts to be prepared to implement an orderly repeal of the statute.”

But Aaron Belkin, director of the Palm Center, UC Santa Barbara think-tank on the subject, said his group’s review of 25 foreign militaries, including the armed forces of Britain, Canada, Israel and Australia, found “none reported a single detriment to military readiness or unit cohesion” after opening their ranks to homosexuals.

The legal debate comes at a tough time for Obama and his Democratic allies in Congress, who risk diminishing support from the gay community, a key constituency, as they fight to hold off a possible rout by Republicans in the November 2 elections.

Republicans, many fiercely opposed to gays serving in the military, are seen gaining from any hot-button social issue that could galvanize their conservative base at the polls.

“Don’t ask, don’t tell” was introduced in 1993 by President Bill Clinton as a compromise between previous regulations that had long excluded gays from the armed forces altogether and a proposal to open the military to gays and lesbians outright.

The new law prohibited commanders from asking service members or recruits about their sexual orientation but subjected troops to expulsion if homosexual behavior on their part was revealed or volunteered.

The Log Cabin Republicans says at least 13,000 men and women have been expelled from the military since “don’t ask, don’t tell” went into effect.