SPRINGFIELD — Despite some last minute hiccups, the Illinois House and Senate on Thursday approved an at times controversial energy bill, which environmental advocates say is the biggest climate bill in Illinois history and opponents say will raise rates and kill thousands of jobs.

The measure now heads to the governor’s desk, and he has vowed to sign it. Gov. Bruce Rauner’s administration became heavily involved in the negotiations last week.

“For months our administration has been very clear that any energy legislation should follow the guiding principles of protecting jobs, ratepayers and taxpayers,” Rauner said in a statement issued after both chambers approved the bill. “After dozens of hours of good faith negotiations, we have reached an agreement that aligns with those principles.”

The House voted 63-38 to approve the energy bill. It only required 60 votes. In the Senate, it passed 32-18.

Legislators on the House floor complained of the bill’s complicated nature and the rush to pass it. Debate lasted for more than two hours.

But Illinois House Republican Leader Jim Durkin warned lawmakers that without passing the bill, the state and its consumers would suffer.

“The consequence of not passing this bill is worse than what people are saying would happen if this bill does go into effect and I hope you understand. But I also believe it’s important we maintain a diverse and reliable energy portfolio because we do believe in the long run, Illinois and its consumers will lose if this bill fails,” Durkin said.

Illinois House Minority Leader Jim Durkin, R-Western Springs. File photo. (AP Photo/Seth Perlman)

Illinois House Minority Leader Jim Durkin, R-Western Springs. File photo. (AP Photo/Seth Perlman)

State Rep. Robyn Gabel, D-Evanston, called it “the most important green energy bill that has ever come before the General Assembly.”

At the heart of some of the controversy is that the bill is viewed by opponents as a corporate bailout to save two Exelon nuclear power plants in Clinton and Quad Cities, while also saving 1,500 jobs for those who operated the plants. It would implement a zero emission credit program for those nuclear power plants, while keeping those open.

The agreement limits rate increases to 25 cents a month for ComEd residential customers. It also limits increases on commercial customers to a 1.3 percent increase over last year’s rates.

Utilities would get $235 million annually from customers for the nuclear power plant subsidy, which rewards the companies for not emitting greenhouse gases. It also would allow ComEd to spend $400 million a year on energy efficiency, which is about $160 million more than it currently spends.

RELATED: Senate nixes Rauner veto of $215M CPS pension bill — will House?
Analysis: Betting it all on the House only gamble left for CPS?
Sour end to fall veto session as Rauner, leaders vow to meet
House passes bill to help save two city worker pension funds

The much revised bill also allows large industrial energy users to not have to pay for energy efficiency programs anymore, a rate cut of almost $500 million, which was asked for by Gov. Bruce Rauner.

And the Environmental Defense Fund has said the bill will bring $12 billion to $15 billion in renewable energy capital investment to the state.

There have been several items removed from the bill — which has been brewing for more than two years. Among the latest change is the effective date, changing it from effective immediately to June 1, 2016. Incentives for southern Illinois coal-fired plants were cut. And a last minute change on Thursday cut out a prevailing wage clause. The bill initially had prevailing wage for utility scale wind and solar projects. An amendment to add rooftop solar developers to the prevailing wage language brought out some controversy. All prevailing wage was removed from the bill’s language Thursday afternoon, according to sources close to the bill.

Prevailing wage was a sticking point for the governor’s office, saying Rauner would reserve his amendatory veto right if it didn’t follow the agreed framework. Exelon would likely have to move forward with closing the two plants if the governor chose an amendatory veto, which would take up time that the company says it doesn’t have.

The controversial demand rates were also cut — that would have charged customers based on their average highest daily demand for electricity. Rauner had called those rates “insane.”

The bill is viewed by environmental advocates as being based primarily to fix the state’s Renewable Portfolio Standard — or to fix the state’s renewable policies by restarting the industry and allowing projects to be built in the state. Those same advocates say just 20 percent of the bill concerns Exelon’s bailout, with about 10 percent benefitting ComEd and Ameren by running better energy efficiency programs.

Rate caps were also clarified for residential customers, large industrial customers and commercial and industrial customers.

If the bill passes the Senate, and meets the governor’s approval, the terms will be in place for consumers for 13 years until 2030, and nuclear plants at 10 years.

Much of the several hours of committee hearings on the bill revolved around concerns for consumers. The bill’s drafters say ComEd customers will see a 10 cent rate increase per month if they currently have average bills of around $90 a month. But they say overall, homeowners will see their rate go down within the next five years because of the way energy efficiency will be paid for.

The bill’s evolution began in 2014 with Exelon seeking $500 million a year for a clean energy standard. The Illinois Clean Jobs Coalition also wanted to expand the state’s renewable policy, and double the amount of energy efficiency in the state. But in May, leaders told the groups those bill wouldn’t pass on their own and directed them to find a compromise.

In November, legislation took out coal projects due to objections from environment groups, along with the demand rate structure.

Part of the renewable energy efforts in the bill include the development of wind farms, solar on roofs and a new provision called community solar, which allows people who can’t put solars on their roofs to subscribe to a project at a local business. Customers would see credits rolled off their electric bill for subscribing to those projects.

Opponents of the plan included coal plant operators in southern Illinois – who argued the market structure in the Midwest doesn’t have competitive markets. The BEST Coalition — which represents business, governmental and consumer groups — is among the bill’s opponents, citing higher power costs and jobs lost and a reduction of the state and local government tax revenue.

The Illinois Attorney General’s Office and AARP were concerned about the amount of money being spent on energy efficiency and the impact on overall costs. Large industrial companies, such as refineries, also opposed the plan because of its bailout inclusion.