Image caption There is strong support for lifting the ban on gays serving openly in the US military

The US administration has asked a judge to stay her order lifting a ban on gay people serving openly in the US military, pending an appeal.

District Judge Virginia Phillips issued an injunction forbidding the military from enforcing the 17-year-old ban.

In another development, the Pentagon said it had issued guidelines to troop commanders to comply with her order.

The "Don't ask, don't tell" policy allows gay people to serve, but only if their sexuality is not revealed.

Although the Obama administration favours scrapping the policy, it would prefer it be done in Congress rather than through the court system.

The US Justice Department filed the stay request in California on behalf of the administration.

In court papers, President Obama's administration said serious legal questions had been raised by the case and that the government would be irreparably harmed unless the current policy was allowed to remain in place temporarily.

"The precipitous changes to military policy required by the court's injunction would result in a host of significant and immediate harms to the recognised public interest in ensuring that the nation has strong and effective military operations," the administration said.

Legal compromise

The administration asked Judge Phillips to respond by Monday "given the urgency and gravity of the issues".

If the judge refuses, the Justice Department said it would seek a ruling blocking the judge's decision from the 9th US Circuit Court of Appeals in San Francisco.

The 1993 law was a compromise aimed at resolving a thorny issue.

However, critics say it violates the rights of gay military personnel and has harmed US national security by forcing out some 14,000 qualified troops.

A legislative attempt to overturn the ban failed in the US Senate last month.

On Wednesday, US Defence Secretary Robert Gates warned that court order could have "enormous consequences" for US forces.

"I feel strongly this is an action that needs to be taken by the Congress and that it is an action that requires careful preparation, and a lot of training," he said. "It has enormous consequences for our troops."