A federal appeals court has temporarily frozen an order requiring the US military to accept openly gay soldiers.

The Ninth US Circuit Court of Appeals granted a request by the US government to suspend the lifting of the ban, leaving gay soldiers and new recruits in limbo.

The court will now consider whether to extend the temporary stay while it considers the Justice Department’s appeal against US District Judge Virginia Phillips’ ruling.

She ruled last week that the ban should end immediately and refused to stay her order but was overruled by the higher court.

The Pentagon has suspended investigations and firings of out gay soldiers and has instructed military recruiters to accept out gay applicants.

It is not yet clear what effect the freeze will have on sackings and recruitment.

This week, at least three veterans sacked under the law went to military recruitment centres to re-enlist. Gay and lesbian troops were warned by the Pentagon not to declare their sexual orientation while the legal situation remains unclear.

The case was brought by Republican gay group Log Cabin Republicans, which said it remained confident of repeal.

Their lawyer Dan Woods told Associated Press: “While we are disappointed with the court’s ruling granting a temporary administrative stay, we view the decision as nothing more than a minor setback.”

The Obama administration supports repealing the ban but wants to see the law changed through Congress rather than the courts.