It was a win for the president and Nancy Pelosi but it was squeaker -- 219 to 212 and 44 Democrats defected and voted no.
The debate took most of the day and Republicans are against the legislation.
"This bad bill is nothing more or less than a national energy tax," said Rep. Tom Cole (R) Oklahoma.
Democrats mostly are for it, including alternative energy engineer Jerry McNerney of Pleasanton.
"The legislation includes key provisions that I wrote," said McNerney.
The bill imposes first ever limits on carbon dioxide, and other green house gas pollution from power plants, factories and refineries, which will have to cut pollution or pay for the privilege by buying pollution credits.
It also forces a shift from coal and other fossil fuels to renewable resources like solar and wind.
Michael Garland is the CEO of Pattern Energy, a newly created spin-off from Babcock and Brown, which had been one of the largest wind power companies in the country.
"It means construction jobs manufacturing jobs operating jobs over the long run," said Garland.
Garland says California is uniquely situated to capitalize on alternative energy investments.
"The venture world is the engine of technology change and it really is centered here, and if you look at the last four or five years, there's been tremendous amount of money going into the energy and renewable area by venture capital in California," said Garland.
Other parts of the country will not see the same benefit, which explains why the voting broke along regional as well as party lines.
House Speaker Nancy Pelosi is calling it a bi-partisan bill.
"I'm very, very proud of my colleagues in the House of Representatives for giving us a very bi-partisan bill," said Speaker Pelosi.
But the voting wasn't bipartisan -- only eight Republicans sided with Pelosi.
"This suggests there is some real push back in the conservative states and in the coal states and in the states that feel like they are not going to benefit from the green jobs," said ABC7 Political Analyst Professor Bruce Cain, Ph.D.
Professor Cain says those considerations will be magnified in the Senate.
"It suggests that ultimately this bill might not succeed," said Prof. Cain, Ph.D.
On Friday afternoon, Governor Schwarzenegger said the bill is not perfect but is a significant step towards combating climate change.
It's a testament of the economic crisis that today the argument was about jobs. Just a year ago gas was $5 gallon and weaning ourselves off imported oil.