WASHINGTON (AP) — The U.S. military passed a historic milestone Tuesday with the repeal of the ban on gays serving openly in uniform, ending a prohibition that President Barack Obama said had forced gay and lesbian service members to "lie about who they are."

Defense Secretary Leon Panetta pledged not to allow other issues of equal opportunity, such as allowing women to serve in combat roles, to be ignored or set aside.

"I am committed to removing all of the barriers that would prevent Americans from serving their country and from rising to the highest level of responsibility that their talents and capabilities warrant," Panetta told a Pentagon news conference. "These are men and women who put their lives on the line in the defense of this country, and that's what should matter the most."

Repeal of the 18-year-old legal provision — commonly known as "don't ask, don't tell," under which gays can serve as long as they don't openly acknowledge their sexual orientation — took effect Tuesday at 12:01 a.m. EDT.

Appearing with Panetta for what was probably his final news Pentagon conference as chairman of the Joint Chiefs of Staff, retiring Navy Adm. Mike Mullen said that with the new law allowing gays to serve openly, the military is a stronger, more tolerant force with greater character and honor.

"I still believe that it was first and foremost a matter of integrity, that it was fundamentally against everything we stand for as an institution to force people to lie about who they are just to wear a uniform," Mullen said. "We are better than that."

Some in Congress still oppose the change, arguing that it may undermine order and discipline, but top Pentagon leaders have certified that it will not hurt the military's ability to recruit or to fight wars.

Obama issued a statement saying he is confident that lifting the ban will enhance U.S. national security.

"As of today, patriotic Americans in uniform will no longer have to lie about who they are in order to serve the country they love," he said. "As of today, our armed forces will no longer lose the extraordinary skills and combat experience of so many gay and lesbian service members."

The head of Pentagon personnel policies issued a memo to the work force at a minute after midnight Tuesday. "All service members are to treat one another with dignity and respect regardless of sexual orientation," the memo from Clifford Stanley said.

Gay advocacy groups celebrated across the country.

At a San Diego bar, current and former troops danced and counted down to midnight. "You are all heroes," Sean Sala, a former Navy operations specialist, said. "The days of your faces being blacked out on the news — no more."

A lingering question is whether disciplinary procedures are adequate to deal with any future instances of harassment of gays in the ranks. Michael Corgan, a professor of international relations at Boston University and a U.S. Naval Academy graduate, said it's mainly a matter of leadership.

"Discipline problems that might arise from gays serving with an overwhelmingly straight population in the military should be able to be handled the way any other disciplinary problems are, if commanders are up to their jobs," Corgan said.

In Iraq, a spokesman for U.S forces put out a statement noting that all troops there had been trained for the change.

For weeks the military services have accepted applications from openly gay recruits, while waiting for repeal to take effect before processing the applications.

With the lifting of the ban, the Defense Department published revised regulations to reflect the new law allowing gays to serve openly. The revisions, such as eliminating references to banned homosexual service, are in line with policy guidance that was issued by top Pentagon officials in January, after Obama signed the legislation that did away with the "don't ask, don't tell" policy.

The lifting of the 18-year-old ban also halted all pending investigations, discharges and other administrative proceedings that were begun under the Clinton-era law.

Existing standards of personal conduct, such as those pertaining to public displays of affection, will continue regardless of sexual orientation.

There also will be no immediate changes to eligibility standards for military benefits. All service members already are entitled to certain benefits and entitlements, such as designating a partner as one's life insurance beneficiary or as designated caregiver in the Wounded Warrior program.

Gay marriage is one of the thornier issues. An initial move by the Navy earlier this year to train chaplains about same-sex civil unions in states where they are legal was halted after more than five dozen lawmakers objected. The Pentagon is reviewing the issue.

Service members who were discharged under the "don't ask, don't tell" law will be allowed to re-enlist, but their applications will not be given priority over those of any others with prior military experience who are seeking to re-enlist.