Washington (CNN) -- The House of Representatives approved a plan Friday that would pave the way for an eventual repeal of the military's controversial "don't ask, don't tell" policy, which bars openly gay and lesbian soldiers from military service.
The measure passed in a largely party-line, 229-186 vote as part of a larger defense authorization bill despite a growing controversy over allegations of wasteful spending in the legislation. Most Democrats backed the bill while most Republicans opposed it.
Attention now shifts to the Senate, where the Armed Services Committee approved a "don't ask, don't tell" repeal earlier in the week. As in the House, the committee was divided sharply along partisan lines.
The plan is a compromise under which the repeal would occur only after a military review of the question and subsequent approval by Obama, the defense secretary and the chairman of the Joint Chiefs of Staff.
Opponents of the repeal language argue 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, they claim.
Under the compromise, the military would be given time to complete its review as sought by Gates and the chairman of the Joint Chiefs of Staff, Adm. Mike Mullen. Gates and Mullen both said this week they could accept the compromise language.
A recent CNN poll seemed to suggest that Americans are 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.
Threatening to derail the plan, however, is House members' insistence on spending almost $500 million on a fighter engine that neither the White House nor the Pentagon wants. Funding for the engine was included in the House's version of the legislation but not the Senate's.
A White House spokesman warned before the House vote on Friday that President Barack Obama would veto the bill if funding for the engine isn't removed. Gates has blasted the proposed funding for the extra F-35 Joint Strike Fighter engine, calling it a "waste of money" that doesn't meet the fighter's performance needs.
The chairman of the Senate Armed Services committee said Friday that he hopes Obama wouldn't veto the plan if Congress failed to remove the controversial funding.
"It's difficult to believe the president would do anything other than look at the entire bill, not just one provision," said Sen. Carl Levin, D-Michigan.
Levin wouldn't predict if the engine funding would still be in the bill by the time it reaches Obama's desk. "We are a long way from having a product," he said. "Some of the things which I would think (Obama) may not like may be dropped along the way."
Supporters of repealing the "don't ask, don't tell" 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 afterward.
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 Pentagon review process told CNN it is 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 Jamie Crawford, Laurie Ure, Alan Silverleib and Adam Levine contributed to this report