The lifting of a ban on gays serving openly in the US military proved short-lived after a federal appeals court ruled late yesterday in favour of granting the Obama administration a temporary delay.

The Pentagon, obeying an earlier court ruling ending the ban, announced on Tuesday that gays could go in army recruitment offices and openly declare themselves as gay and still be considered for enlistment.

Some gay campaigners, such as former army lieutenant Dan Choi, who was discharged earlier this year because he is gay, celebrated by going to a recruitment office on Tuesday and Wednesday to re-enlist. The army accepted his request without hesitation and began the process.

But the federal appeals court decision in California threw the whole issue into confusion. The Pentagon was unable to clarify on last night whether gays would be allowed to enlist openly. But it seems likely that it will revert to the ban until the Obama administration and the courts finally resolve the issue.

Although President Barack Obama favours an end to the "don't ask, don't tell" policy in which gays could serve in the military as long as their sexual orientation remained secret, his justice department went to the courts seeking a temporary delay to allow the military time to prepare for the end of the gay ban, and – possibly – allow Congress to legislate.

The Servicemembers Legal Defense Network, a group representing military personnel affected by the "don't ask, don't tell" policyyesterday cautioned gay people against applying to join the military until the legal confusion was cleared up, saying it might take days or weeks.

But Aubrey Sarvis, the executive director of the group, was in little doubt about the eventual outcome. "The reality is, the toothpaste is out of the tube," he said.

The federal appeals court, which granted the temporary appeal, asked lawyers representing gay campaigners to provide their responses on Monday before deciding whether the ban on gays serving openly in the military is unconstitutional.

Cynthia Smith, a Pentagon spokeswoman, said: "For the reasons stated in the government's submission, we believe a stay is appropriate."

She declined to say whether the Pentagon would reverse its guidance to military lawyers and recruiters that they must allow gays to enlist.

A lawyer for the Log Cabin Republicans, which is campaigning for gays to serve openly in the military, said the group was disappointed, but called it a minor setback.

Choi, 29, kept supporters updated through Twitter on his progress through the army enlistment process.

After completing a basic skills test, Choi wrote that he had missed only three verbal questions and five of the maths questions. He added triumphantly: "I passed."

Choi was back at the recruitment office in Times Square, New York, yesterday morning after a visit on Tuesday to declare he was gay and to inform them he planned to re-enlist in the wake of a federal court ruling confirming existing Pentagon policy on gays was illegal.

After his initial stop at the recruiting centre two days ago he said: "Apparently I'm too old for the marines. Just filled out the army application." He added: "A week ago I would be turned away. Today was very different. I was very excited. They are processing it."

Choi said he refused to lie on his army application. He wrote on the form: "I was discharged in 7/2010 from the US [army] because I told the truth about my sexual orientation and refused to lie about my cherished and loved partner."

Elsewhere, the response was mixed, with some enlistment centres saying the Pentagon had not informed them of a change in policy.

Randy Miller, 24, from Stockton, California, honourably discharged from the army in 2006 after being outed by another trooper, said he was turned away from one recruiting office by staff who said they had not been told of the change in policy.