Image caption Some gay people discharged under the "don't ask, don't tell" policy have attempted to re-enlist

An appeals court has ruled the US military can temporarily reinstate a ban on openly gay people serving, in a move adding to disarray on the issue.

The decision came eight days after a judge struck down the "don't ask, don't tell" policy on gays serving openly.

The military began accepting gay recruits this week, but it sought to keep the ban in place while it appealed against its overturning.

On Wednesday a San Francisco court said the ban could continue temporarily.

The legal moves come as the Pentagon studies how gay people can be properly integrated into the US military, an effort that would entail dramatic changes in policies on insurance, housing and even protocol at military social events.

President Barack Obama and some top military leaders have called for ending the ban, but Mr Obama believes it should be done through legislation, rather than court action. Meanwhile, his administration has argued overturning the ban immediately could cause problems for the military.

Britain, Israel and dozens of other countries allow gay personnel to serve openly. Under the policy established in 1993 under former President Bill Clinton, the US military is forbidden to inquire about service members' sexual orientation, but can expel people discovered to be homosexual.

The Justice Department said in its latest appeals court filing that leaving California Federal Judge Virginia Phillips's overturn of the ban in place could create uncertainty for the "status of service members who may reveal their sexual orientation in reliance on the district court's decision and injunction".

The court papers added that developing "training and guidance" in relation to a change in the "don't ask, don't tell" policy would take time and effort.

Advocates for gay troops have urged them not to reveal their orientation yet, citing the ongoing uncertainty.

'Violating free speech'

Judge Phillips declared on 12 October that the policy violated gay military members' rights to free speech and to equal protection under the law.

Democrats in the US Senate attempted to overturn the policy in September, but failed to get the necessary votes amid universal opposition from the minority Republicans. The House of Representatives approved measures to change the policy in May.

Meanwhile, US Secretary of State Hillary Clinton voiced her support for gay teenagers through a video message posted on Tuesday on the website YouTube, saying "hang in there and ask for help".

On Wednesday, former US Army Lt Dan Choi, who was discharged after declaring on television that he was gay and could no longer conceal his identity, filed papers to re-enlist in the army.