Washington (CNN) -- The U.S. House and a Senate committee approved amendments to a military bill Thursday that would repeal the "don't ask, don't tell" policy barring openly gay and lesbian soldiers from military service, but only after some conditions are met.
The Senate Armed Services Committee voted 16-12 to approve compromise language on the repeal in an amendment to the military policy bill. The panel then voted 18-10 to send the bill to the full Senate.
In the House, the chamber voted 234-194 to add the amendment to its version of the defense policy bill. A final vote on the full bill was expected Friday.
President Barack Obama praised the votes.
"I am pleased that both the House of Representatives and the Senate Armed Services Committee took important bipartisan steps toward repeal tonight," Obama said in a statement. "This legislation will help make our Armed Forces even stronger and more inclusive by allowing gay and lesbian soldiers to serve honestly and with integrity."
The Human Rights Campaign, which advocates for lesbian, gay, bisexual and transgender rights, called it the first time since the "don't ask, don't tell" policy came into effect during the Clinton administration that any congressional body voted to repeal it.
"This is the beginning of the end of a shameful ban on open service by lesbian and gay troops that has weakened our national security," said Human Rights Campaign President Joe Solmonese.
The Senate committee's vote on the amendment was mostly partisan, with 15 Democrats and one Republican -- Sen. Susan Collins of Maine -- supporting the compromise repeal language. The House vote also was along largely partisan lines, with 229 Democrats and five Republicans supporting the repeal amendment, while 168 Republicans and 26 Democrats opposed it.
Under the compromise, the repeal would occur after a military review of the matter and subsequent approval by Obama, the defense secretary and the chairman of the Joint Chiefs of Staff.
Opponents of the repeal language said the military should first carry out the review ordered by Defense Secretary Robert Gates that is scheduled to be completed in December. Only then would military leaders have the necessary information from force members to develop a plan for carrying out the repeal, according to the opponents.
"I see no reason to pre-empt the process that our senior Defense Department leaders put into motion, and I am concerned that many members of the military would view such a move as disrespectful to the importance of their roles in this process," said Sen .Jim Webb, D-Virginia, who voted against the amendment.
A recent CNN poll seemed to suggest that Americans were ready for the change. The CNN/Opinion Research Corp. survey released Tuesday indicated that 78 percent of the public supports allowing openly gay people to serve in the military, with one in five opposed.
The compromise worked gave time for the military to complete its review of the planned repeal, as sought by Gates and the Joint Chiefs of Staff.
Gates and Adm. Mike Mullen, the Joint Chiefs chairman, both said this week they could accept the compromise language.
Supporters of repealing the policy have been pressuring congressional Democrats to act now, fearing the party will lose its House or Senate majority in November's midterm election and be unable to pass the measure then.
The compromise emerged late Monday from a meeting at the White House involving administration officials, gay rights groups and Pentagon officials, sources told CNN.
There were also talks on Capitol Hill involving White House lawyers, Pentagon officials and staff from the offices of influential House and Senate Democrats including House Speaker Nancy Pelosi, the sources added.
A senior U.S. military official with direct knowledge of the review process told CNN it was well under way, with a survey going out shortly to about 70,000 troops and families to solicit their views.
In addition, the official said, town hall meetings already have been held around the country and more are expected, while a website provides a place for troops to write in their views.
The military needs until the end of 2010 to figure out how to implement the repeal in terms of housing, medical and marriage benefits, as well as issues involving the reinstatement of gay soldiers previously discharged under the policy, the official said.
A major problem might be determining how to reconcile the repeal of "don't ask, don't tell" with federal law that defines marriage as between a man a woman, the official added.
CNN's Ted Barrett and Deirdre Walsh contributed to this report.