Updated

A federal appeals court ordered the U.S. government on Wednesday to immediately cease enforcing the ban on openly gay members of the military, a move that could speed the end of the 17-year-old rule.

Congress repealed the policy in December and the Pentagon is already preparing to welcome gay military personnel, said the ruling from a three-judge panel of the 9th U.S. Circuit Court of Appeals in San Francisco. There's no longer any purpose for a stay the appeals court had placed on a lower court ruling that overturned "don't ask, don't tell," the judges said.

In the meantime, the court order blocks the military from discharging anyone based on sexual orientation, a Pentagon spokesman said, news that brought relief from gay rights advocates who say there are still dozens of gay or lesbian personnel under investigation.

"The ruling ...removes all uncertainty -- American servicemembers are no longer under threat of discharge as the repeal implementation process goes forward," said R. Clarke Cooper, Log Cabin Republicans executive director.

The Pentagon will comply with the court order and is taking immediate steps to inform commanders in the field, said spokesman Col. Dave Lapan.

The next step: the official end to "don't ask, don't tell."

Defense officials said the chiefs of the military services are scheduled to submit their recommendations on the repeal to Defense Secretary Leon Panetta on Friday. As soon as the Pentagon certifies that repealing the ban will have no effect on military readiness, the military has 60 days to implement the repeal.

Officials said they believe the ban could be fully lifted by the end of September. The officials spoke on condition of anonymity to discuss internal deliberations.

The services have been training their forces on the new law for the past several months. The Navy, Air Force and Marine Corps are largely done with the training, and the Army is on track to finish the active duty training by July 15.

The ruling on Wednesday came in response to a motion brought by Log Cabin Republicans, a group for gay GOP members, which last year persuaded a lower court judge to declare the ban unconstitutional.

After the government appealed U.S. District Judge Virginia Phillips' decision, the 9th Circuit agreed to keep the policy in place until it could consider the matter. The appeals court reversed itself with Wednesday's order by lifting its hold on Phillips' decision. It cited as a reason the Obama administration's recent position in another case involving same-sex marriage that it is unconstitutional to treat gay Americans differently under the law.

"The circumstances and balance of hardships have changed, and (the government) can no longer satisfy the demanding standard for issuance of a stay," the panel said.

Although the stay is lifted, the 9th Circuit scheduled an Aug. 29 hearing to consider whether the government's appeal of the lower court's decision is valid. But it's unclear whether the Pentagon will pursue the appeal, since defense officials already have said they'll stop enforcing the ban.

Organizations that represent gay military members and veterans cautioned those on active duty or hoping to enlist against rushing to declare their sexual orientations until the government declares that it intends to abide by the ruling. During the eight-day period last fall before the 9th Circuit put Phillips' injunction prohibiting enforcement of "don't ask, don't tell" on hold, several of the estimated 14,000 veterans who had been discharged under the policy unsuccessfully tried to re-enlist.

"As the news goes out over the wire, troops will see again, as they did last fall, that `DADT is dead'," said an Air Force officer who co-founded a gay service member support group called OutServe and asked not to be identified by name for fear of being discharged. "More gay troops will think this is over; straight soldiers will inadvertently `out' their friends. Since most of the troops have been trained, the best course is to let the decision stand."

Aubrey Sarvis, executive director of Servicemembers Legal Defense Network, said his group currently has a load of about 40 cases involving servicemembers who are under investigation for being gay or lesbian. Among the group's clients are a man and a woman who appeared this year before base review boards that recommended their dismissals to the secretaries of their respective services, Sarvis said.

Although he thinks those clients are no longer in danger of being discharged and that further "don't ask, don't tell" investigations would be prohibited under the court's order, Sarvis said that gay military personnel would remain unnecessarily fearful until President Obama, Defense Secretary Leon Panetta and Joint Chiefs of Staff Chairman Mike Mullen "get on with that important certification."

"We have a court here issuing a wakeup call to the Pentagon," he said. "This order is welcome, but it does add another layer of confusion and the solution is certification by the president, the defense secretary and Admiral Mullen in days, not weeks."

The order was signed by the 9th Circuit's chief judge, Alex Kozinski, who was appointed by President Ronald Reagan, and by Judges Richard Paez and Kim Wardlaw, who both were appointed to the bench by President Bill Clinton.