The course correction came in a 304-118 House vote at 10:35 p.m. Wednesday adopting a 108-page White House-Senate compromise that officially scrapped the last vestiges of Bush-era plans to return astronauts to the moon by 2020.

The deal authorized $1.3 billion over the next three years for commercial spacecraft companies to begin ferrying cargo and astronauts to the orbiting space station, freeing NASA to pour billions of dollars into developing heavy lift rockets and crew capsules suitable for deep space exploration.

The compromise, in the making for months, was crafted by Sens. Kay Bailey Hutchison, R-Dallas, and Bill Nelson, D-Fla., and now heads to President Barack Obama's desk for signature into law.

Officials said any return to the moon under the revised blueprint for manned space exploration would depend upon foreign nations' chipping in up to $2 billion a year for a joint effort with the United States - a scenario that's considered unlikely.

The compromise brought together Texas Democrats and Republicans who have little in common on hot button political issues but often support efforts to help NASA and Houston's Johnson Space Center, a complex that accounts for 18,294 NASA and contractor employees and billions of dollars in the local economy.

Only Rep. Gabrielle Giffords, D-Ariz., chair of the House subcommittee with jurisdiction over NASA, broke ranks with pro-NASA committee leaders to unsuccessfully urge the House to reject the compromise.

Wednesday's outcome represents a symbolic victory for the White House after seven months of contentious negotiations with members of Congress who sought to protect existing NASA projects that provide jobs, payrolls and contracts in their districts. Obama managed to win the most dramatic shift in direction for NASA in more than a generation.

In a tense behind-the-scenes moment, backers of the bill said they almost pulled the measure from the House floor because they were shy of the two-thirds majority needed to win approval under a procedural suspension of House rules. Lawmakers said they pressed colleagues through the evening to try to win the support they needed to gain approval for the legislation.

The deal calls for extending operations of the space station for five years to 2020; adding one more shuttle flight to the two remaining flights scheduled before the fleet retires in 2011; boosting federal support for the fledgling commercial spacecraft industry and building a deep space rocket and crew capsule by 2016.

The compromise still leaves the United States relying on Russia's Soyuz system to get cargo and astronauts to the $100 billion space station for the four- or five-year period between the time the shuttle retires in 2011 and expected delivery of either commercial spacecraft or NASA-built spacecraft that can service the orbiting laboratory.

Rep. Pete Olson, R-Sugar Land, ranking Republican on the House committee with jurisdiction over NASA, said he shifted his support behind the compromise because "it was clear" legislation protecting the entire Constellation program could not pass the House and Senate before lawmakers rush home to the campaign trail for the midterm congressional elections.

The deal provides "direction to keep important programs at NASA on course," said Olson, whose district includes JSC. The compromise represented what was "best for NASA."

Texans, both Republicans and Democrats, took umbrage with some of Obama's vision for the agency but decided a compromise outweighed the risk of more uncertainty.

"This is a clear choice between saving the manned space program and thousands of Houston-area jobs - or the president's abstract idea," said Rep. Kevin Brady, R-The Woodlands, ranking House Republican on the Joint House-Senate Economic Committee. "Why should we squander our technological edge and leadership position in space?"

Said Rep. Sheila Jackson Lee, D-Houston, "The cup will be half full and not half empty. It lets us live to fight another day."

Rep. John Culberson, R-Houston, said the bill provides NASA with the direction and funding needed to preserve the manned space program.

And, said Rep. Al Green, D-Houston, "At a time of high unemployment, let's keep Americans working."

stewart.powell@chron.com