If Nancy Pelosi gets her way by the end of the week, the U.S. House of Representatives will have passed landmark global-warming legislation. But you might not know it from the near unanimously bad reviews so many different interested parties are giving it. Groups as disparate as the U.S. Chamber of Commerce, Greenpeace, Friends of the Earth, the Farm Bureau, the American Petroleum Institute and the National Association of Manufacturers have expressed either strong concerns or outright opposition to the bill.

It wasn't supposed to be this way. Global warming has long been a Democratic priority  and with House Speaker Pelosi and President Barack Obama behind it, many didn't think Democrats would have had such a hard time reaching a consensus on legislation. But getting enough rural and moderate Democrats to sign on was no easy task; the final (some would say watered down) deal is a hard-won, middle-of-the-road bill that is still likely to lose Democratic votes from both the right and the left, though it may gain some moderate Republicans. (Read "Global Warming: A Hot Earth Could Worsen Allergies and Kidney Stones.")

More than anyone on Capitol Hill, Pelosi has staked her reputation on the bill, which would require a 17% reduction of greenhouse gases by 2020 from 2005 levels and about an 80% reduction by midcentury. A failed vote could be devastating to her embattled speakership. Pelosi spent much of Wednesday and Thursday cajoling her members on the phone, in meetings, on the House floor during votes, even following a member into the Speaker's lobby  the domain of the press  to make her case in full view of a pack of reporters. She also met with seven GOP moderates on Wednesday, extending a rare hand across the aisle. Even former Vice President Al Gore was recruited to work the phones from Tennessee. Obama made the case himself for the bill on Thursday, telling reporters, "This is going to be a close vote because of misinformation out there that there's somehow a contradiction between clean energy and economic growth."

As of Thursday Democrats were feeling pretty good about the vote, though leaders acknowledged that it would be close. "I don't know that we'll get 218 hard yeses ahead of time, but there's a sense that once you put it on the floor the votes will be there," said Representative Mike Doyle, a Democrat who represents a steel-manufacturing district in western Pennsylvania. Doyle was initially leery of the bill, but was brought around by concessions from Energy & Commerce Committee chairman Henry Waxman. Those changes and other last-minute compromises made to appease Agriculture Committee chairman Collin Peterson are "going to go a long way toward getting a lot of those fence-sitters on the Ag committee to become yes votes," Doyle said. Many manufacturers and small businesses are afraid that increased energy prices might make them less competitive on the global market, and Doyle spent much of his day Wednesday and Thursday reassuring nervous members that he doesn't believe the bill will pass on the drastically higher energy costs they fear. (See the effects of climate change.)

Peterson led a six-week campaign on behalf of Agriculture Committee Democrats and some fiscally conservative, so-called Blue Dog Democrats  a bloc of 45 votes  against two provisions in the bill. Ending a turf war, Waxman  whose committee has jurisdiction over the Environmental Protection Agency  allowed the Agriculture Department, not the EPA, to oversee a potentially lucrative program to create technology to save energy for farmers (Peterson allowed that the Obama Administration could weigh in on the EPA's role in the issue, if any). And Waxman agreed to bar the EPA for five years from calculating how much greenhouse-gas emissions are generated when forests are converted to crop fields for the production of ethanol and biofuels, which many environmentalists believe do more harm than good. The move helps get these controversial sources of energy counted as renewable, and therefore eligible for the Renewable Energy Standard, which obliges large electricity providers to use at least 20% renewable energy sources by 2025.

The potential cost to the consumer has dogged the bill for months. Republicans, citing an MIT study, say the measure could cost households as much as $3,100 a year, a number disputed by factcheck.org. The group interviewed one of the authors of that study, who said the true impact would be more like $800 a year. The Congressional Budget Office, giving a boost to Democrats, last week said the program would cost the average family $175 in 2020. Whatever the expense, Republicans are labeling the bill as a carbon tax that  on top of the stimulus and the push for health-care reform  America's families can ill afford. "Nancy Pelosi's having a tough time getting the votes for that bill," Representative Eric Cantor, the No. 2 House Republican, said Wednesday on Fox News. "Simply because, I think, the American people are waking up to the cost and consequences of the Democrats' agenda. They're spending money that we don't have." (Watch an interview with Energy Secretary Steven Chu.)

The more than 1,200-page bill, known as the American Clean Energy and Security Act, would give away carbon credits to energy aggregators, producers, refiners and others  a financial boon worth more than $600 billion  to help offset costs for consumers. The Administration initially envisioned auctioning off the credits to raise money for green jobs and other Obama priorities, but that idea was met with stiff resistance from the business community.

For all of its critics, the bill does have the backing of dozens of groups, including unions  even steel workers and coal miners  as well as six of the seven largest utilities, the Nuclear Energy Institute and, tacitly, Wall Street, which will benefit from the creation of a massive new energy-trading market. The majority of environmental groups support the bill, including the Natural Resources Defense Council and the League of Conservation Voters, even if some groups feel that the measure is too weak. When Waxman announced the agreement in a press conference Wednesday, about 30 supporters wearing T shirts and carrying placards that read MAKE OUR ENERGY CLEAN, MAKE IT AMERICAN stood behind him. Still, the support of their groups remains tenuous. "It's not a perfect bill and we're concerned that the Senate might weaken the near-term emissions reduction caps," said Brenda Ekwurzel, a member of the Union of Concerned Scientists, holding a placard behind Waxman. "We'd look at that closely before giving our final support."

One would imagine that such a delicately crafted, Senate-like compromise would stand a good chance in the Senate. A bipartisan climate-change bill failed to overcome a filibuster in the Senate last year by a vote of 54-36, and the Democrats have gained at least seven seats since then. But if it was tough to convince rural House Democrats, winning over Senators from farm states, who carry much more relative power than their House counterparts, will be even harder. And if the House compromise made many prominent groups unhappy, one can only imagine what feelings the sausagemaking in the Senate will provoke.