Update: The US Senate passed legislation that will repeal the military's exclusionary 'don't ask, don't tell' policy on Saturday afternoon by a vote of 65-31. The measure will be on President Obama's desk for his signature next week.

"Today, America lived up to its highest ideals of freedom and equality. Congress recognized that all men and women have the right to openly serve their country," Joe Solmonese, the president of the Human Rights Campaign, an LGBT-rights group, said. "Plenty of people had already planned the funeral for this legislation. Today, we pulled out a victory from what was almost certain defeat just a few days ago. We are grateful to President Obama, Majority Leader Reid and Sens. Lieberman, Collins and countless others for their dogged determination to repeal DADT."

An earlier report follows...

APresident Barack Obama's landmark drive to let gays serve openly in the US military for the first time in history looked on track to clear its final major obstacle in Congress on Saturday.

Senators were set to vote to end debate on broadly popular legislation to scrap the "Don't Ask Don't Tell" policy enacted in 1993 that requires gay troops to keep quiet about their sexual orientation or face dismissal.

"The first casualty in the war in Iraq was a gay soldier. The mine that took off his right leg didn't give a darn whether he was gay or straight. We shouldn't either," said Democratic Senator Carl Levin.

"We cannot let these patriots down. Their suffering should end. It will end with the passage of this bill. I urge its passage today," said Levin, who chairs the Senate Armed Services Committee.

Final passage, virtually a formality if the measure survives the procedural ballot, could come later Saturday or Sunday.

If successful, that second vote would send the measure to Obama to sign into law, fulfilling his 2008 campaign promise and ushering in perhaps the biggest sea change in the US military since racial integration began in 1948.

Supporters who want to scrap the policy have said they will lose their best chance in years when a new US Congress musters in January with Republicans -- who largely oppose repeal -- in charge of the House.

Passage would trigger a potentially difficult process that envisions lifting the ban only after the president, the secretary of defense, and the top US uniformed officer certify that doing so can be done without harming military readiness, effectiveness, unit cohesion, recruiting and retention.

Republicans have scoffed that the leaders involved have already stated their support to ending the policy.

"They have already made up their minds," said Republican Senator James Inhofe.

The Pentagon issued a study this month that found a solid majority of troops were not bothered by the prospect of lifting the ban and that the military could implement the change without a major disruption or upheaval.

The repeal effort enjoys broad support from the US public, as well as from Defense Secretary Robert Gates and US Joint Chiefs Chairman Mike Mullen.

Gates has warned that, absent congressional action, US courts may force an end to the policy before the Pentagon is fully prepared to do so.

In the years since the ban was enacted as a compromise to deal with the tricky issue of gays in the military, some 13,000 US troops have been ousted, and critics have pointed out that many were trained at great expense, like fighter pilots, or had hard-to-find skills, such as Arabic translators.

But opponents of the legislation have cited testimony from US military service chiefs who warned against a quick repeal, citing concerns about unit cohesion.

General James Amos, commandant of the Marine Corps and an opponent of lifting the ban, warned Tuesday that ending it could jeopardize the lives of Marines in combat by undermining closely knit units.

"I don't want to lose any Marines to distraction. I don't want to have any Marines that I'm visiting at Bethesda (hospital) with no legs," he told reporters this week.

The Saturday procedural ballot on repeal will occur after the Senate holds a vote on whether to end debate on an immigration bill, which is not expected to net the 60 votes needed to proceed.