US Defence Secretary Robert Gates has warned a court-ordered halt of a ban on openly gay military personnel could have "enormous consequences".A day after a judge halted the "Don't ask, don't tell" policy, Mr Gates said he preferred that Congress, not a court, settle the issue.Under the policy, gay people can serve in the military but face expulsion if their sexuality is revealed.Gay air force nurse is reinstated Senate blocks gay policy debate A legislative bid to overturn the ban failed in the US Senate last month."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," Mr Gates said. "It has enormous consequences for our troops."Mr Gates' comments aboard a military aircraft came a day after US District Judge Virginia Phillips, in California, issued a permanent injunction forbidding the US military from enforcing the 17-year-old ban.At the White House on Wednesday, spokesman Robert Gibbs described "don't ask, don't tell" as "a policy that is going to end". But he declined to answer whether the Obama administration preferred to seek a stay of the injunction and appeal against the ruling.President Barack Obama has said he wants to end "Don't ask, don't tell'.But that doesn't mean that the judgement will go uncontested.The justice department is not obliged to appeal the ruling or seek a stay, but the president has always maintained that his preferred course of action is to change the law through Congress.That has been tried once already this year and was blocked in the Senate.With the conservative Republican Party expected to pick up more seats in the coming mid-term elections this particular route is unlikely to get easier. Meanwhile the Pentagon is carrying-out an extensive survey of serving personnel, gauging their attitudes to working alongside gay colleagues.Its findings are expected to show a softening of views in recent years, reflecting broader changes in society. However there will be parts of the report that are ambiguous and provide ammunition to both sides of this debate.The US Department of Justice has 60 days to appeal but may opt not to do so.President Barack Obama has said repeatedly he favours scrapping the ban, and Mr Gibbs reiterated the administration would prefer it be done in Congress rather than the court system.The US House has already passed a repeal, but the bill stalled in the Senate last month amid staunch Republican opposition. Republicans are poised to make gains in both chambers in the upcoming mid-term election."The political balance of power is going to shift after these elections," said Richard Socarides, former gay and lesbian policy adviser to President Bill Clinton. "It's only going to get harder."Meanwhile, the Pentagon has been studying how gay people can be integrated into the US military and is to report on its findings on 1 December. Pentagon officials have said allowing openly gay military personnel would necessitate dramatic policy changes on everything from housing and insurance to protocol at social events.Pending the uncertainty, a prominent legal organisation warned gays in the military not to reveal their sexual orientation yet."Service members must proceed safely and should not come out at this time," Aaron Tax, legal director for the Servicemembers Legal Defense Network said.President Bill Clinton wanted to lift the ban on gay people in the military After staunch opposition, compromise "don't ask, don't tell" policy passed in 1993 Between 1997 and 2008, 10,500 service members discharged under rules President Barack Obama pledged to repeal the policy Pentagon review announced in February 2010 Britain, Israel and dozens of other countries allow gay personnel to serve openly, but under the US policy established in 1993, gays may serve in the military but cannot acknowledge their orientation. The military is forbidden to inquire but may expel service members found to be gay.The lawsuit that led to the world-wide injunction against the ban was brought by the Log Cabin Republicans, a pro-gay Republican group, on behalf of openly gay military personnel who had been discharged.Supporters of the ban say allowing gay people to serve openly in the US military would lower troop morale and hinder military readiness.Judge Phillips declared the policy unconstitutional after a brief trial last month. She found it violated gay military members' rights to free speech and to equal protection under the law.Government lawyers objected to an immediate, nationwide injunction, arguing it might harm military operations during wartime.