WASHINGTON - The debate over gays in the military has been settled with a historic decision to allow them to serve openly, but questions remain about how and when the change will take place, how well it will be accepted by soldiers, and whether it will hamper U.S. military efforts in Afghanistan and Iraq.

President Obama is expected to sign into law this week the legislation that passed the Senate on Saturday, but it probably will not be implemented for months. Obama and his advisers must first certify that repealing the 1993 "don't ask, don't tell" ban on gays' serving openly will not damage troops' ability to fight.

In the meantime, the restrictions will remain on the books, although it is unclear whether they will be fully enforced. Some believe discharges of soldiers revealed to be gay will be dropped as soon as Obama signs the law.

Until 1993, all recruits had to state on a questionnaire whether they were homosexual; if they said "yes," they could not join. Since then, 13,500 service members have been dismissed under "don't ask, don't tell."

In the years since the 1993 ban went into effect, views in the wider society have evolved. Gay marriage is now legal in five states and the District of Columbia. Opinion surveys say a majority of Americans believe it is fine for gays to serve in uniform.

The repeal vote by Congress was a political victory for Obama, who campaigned on ending the ban.

Even though opponents have made clear they will continue to argue against the change, Peter Mansoor, a retired Army colonel who commanded a brigade in Iraq, said Sunday that he believed the military - from top commanders to foot soldiers - would accept the new orders.

"Pretty much all the heated discussion is over, and now it's a matter of the more mundane aspects of implementing the law," said Mansoor, a professor of military history at Ohio State University.

That begins, under terms of the legislation, with Obama's certification to Congress - for which there is no stated deadline. Even after that, there will be a mandatory 60-day waiting period.

Aaron Belkin, director of the Palm Center, a research institute at the University of California, Santa Barbara, said he expects the Pentagon to announce shortly that it needs a long time for training and education to prepare troops for the change - possibly lasting much of 2011.

In a statement Saturday, Defense Secretary Robert M. Gates said he would begin the certification process immediately. But any change in policy will not come until after careful consultation with military service chiefs and combatant commanders, he said.

Gates supported Obama's push to repeal the ban, but he stressed a go-slow approach.

Some questions Gates faces before providing certification have been answered in the recommendations of a year-long Pentagon study on the impact of repealing the ban.

The study said, for example, that no new standards of conduct are needed. It found that issues of sexual conduct and fraternization can be dealt with under existing Defense Department rules and regulations, including the Uniform Code of Military Justice.

Certifying to Congress also requires writing Pentagon policies and regulations to put in place the repeal law - and stating that the new policies are consistent with standards that allow the military to remain ready for combat, to fight effectively and to ensure cohesion in fighting units.

Elaine Donnelly, president of the Center for Military Readiness and a leading opponent of repealing the 1993 law, said Sunday that the certification would be a "sham" because it will be done by three people who already have stated their support for the change: Obama, Gates and Adm. Mike Mullen, chairman of the Joint Chiefs of Staff.

Donnelly also said passage and implementation of the repeal legislation will lead to a wave of lawsuits by gay troops seeking, for example, more military benefits for same-sex partners.

"The story is just beginning," she said.

Gay-rights activists say the complications and uncertainties are being overblown.

"Only three steps are needed to assure a smooth and quick transition to open gay service," Belkin said. They are: an immediate executive order from Obama suspending discharges of gays on grounds of sexual orientation, a few weeks to put new regulations in place, and immediate certification to Congress that the new law will work.