SAN DIEGO — The military is accepting openly gay recruits for the first time in the nation’s history, even as it tries in the courts to slow the movement to abolish its “don’t ask, don’t tell” policy.

At least two service members discharged for being gay began the process to re-enlist after the Pentagon’s recruiting announcement Tuesday. With that, the barriers built by an institution long resistant and sometimes hostile to gays had come down.

The movement to overturn the 1993 Clinton-era law gained speed when President Obama campaigned for its repeal. The effort stalled in Congress, but found new life last month when U.S. District Judge Virginia Phillips declared the 17-year-old law unconstitutional.

In California on Tuesday, Phillips rejected the government’s latest effort to halt her order telling the military to stop enforcing the law. Government lawyers will likely appeal.

“Gay people have been fighting for equality in the military since the 1960s,” said Aaron Belkin, executive director of the Palm Center, a think tank on gays and the military at the University of California Santa Barbara. “It took a lot to get to this day.”

The Defense Department has said it would comply with Phillips’ order and had frozen any discharge cases. Pentagon spokeswoman Cynthia Smith said Tuesday that recruiters had been given top-level guidance to accept applicants who say they are gay.

AP interviews found some recruiters following the order and others saying they had not heard of the announcement.

Recruiters also have been told to inform potential recruits that the moratorium on enforcement of the policy could be reversed at any time, if the ruling is appealed or the court grants a stay, Smith said.

Gay rights groups were continuing to tell service members to avoid revealing that they are gay, fearing they could find themselves in trouble should the law be reinstated.

“What people aren’t really getting is that the discretion and caution that gay troops are showing now is exactly the same standard of conduct that they will adhere to when the ban is lifted permanently,” Belkin said. “(But) yes, a few will try to become celebrities.”

An Air Force officer and co-founder of a gay service member support group called OutServe said financial considerations are playing a big role in gay service members staying quiet.

“The military has financially trapped us,” he said, noting that he could owe the military about $200,000 if he were to be dismissed.

The officer, who asked not to be identified for fear of being discharged, said he’s hearing increasingly about heterosexual service members approaching gay colleagues and telling them they can come out now.

He also said more gay service members are coming out to their peers who are friends, while keeping it secret from leadership. He said he has come out to two peers in the past few days.

An opponent of the judge’s ruling said the confusion that has arisen is exactly what Pentagon officials feared, and shows the need for Phillips to immediately freeze her order while the government appeals.

“It’s only logical that a stay should be granted to avoid the confusion that is already occurring with reports that the Pentagon is telling recruiters to begin accepting homosexual applicants,” said Tony Perkins, president of the Family Research Council, a conservative advocacy group based in Washington that supports the policy.

Before the 1993 law, the military banned gays and declared them incompatible with military service. Twenty-nine nations, including Israel, Canada, Germany and Sweden, allow openly gay troops, according to the Log Cabin Republicans, a gay-rights group and plaintiff in the lawsuit before Phillips.

The Pentagon guidance to recruiters comes after Dan Woods, the group’s attorney, sent a letter last week warning the Justice Department that Army recruiters who turned away Omar Lopez in Austin, Texas, may have caused the government to violate Phillips’ injunction. Woods wrote that the government could be subject to a citation for contempt.

Meanwhile, the White House has insisted that government actions in court do not diminish Obama’s efforts to repeal “don’t ask, don’t tell.”

In their stay request, government lawyers argued that Phillips’ order would be disruptive to troops serving at a time of war. They say the military needs time to prepare new regulations and train and educate service members about the change.

Phillips has said her order does not prohibit the Pentagon from implementing those measures. She said the government failed to prove any harm to troops because the policy has been lifted.

“Defendants merely conclude, without explanation, that ‘confusion and uncertainty’ will result if the injunction remains in place,” she said in her ruling. “Thus, defendants have failed to establish they are likely to suffer irreparable injury if a stay is not granted.”

Douglas Smith, spokesman for the U.S. Army Recruiting Command based at Fort Knox, Ky., said that even before the ruling, recruiters did not ask applicants about their sexual orientation. The difference now is that recruiters will process those who say they are gay.

“If they were to self-admit that they are gay and want to enlist, we will process them,” Smith said, adding that the enlistment process takes time. “U.S. Army Recruiting Command is going to follow the law, whatever the law is.”

The message, however, had not reached some recruiting stations.

In Pensacola, Fla., Marine Sgt. Timothy Chandler said he had been given no direction. “As far as we are concerned, everything is the same. The policy hasn’t changed,” he said as others in the office nodded.

Chandler said no one had come to the office questioning the policy or asking about being openly gay and serving.

Recruiters at the Navy office next door referred all media questions to the Pentagon. Air Force recruiters said they were not authorized to talk to the media. Army recruiters referred questions to another office in Mobile, Ala.

In New York’s Times Square, Dan Choi, a 29-year-old Iraq War veteran who was discharged for being gay, began the process to enlist in the Army.

In San Diego, Will Rodriguez, a former Marine who was discharged under the policy in 2008, gave his contact information to recruiters. He said they told him there were no slots for troops of his category, but they promised to call him in January when more may become available.