HARTFORD — In the waning hours of the General Assembly session, some unlikely allies ganged up to kill legislation they claimed would have been a giveaway to the energy company that runs the only nuclear plants in Connecticut.

Environmentalists and the oil and natural gas industries joined forces against Dominion Resources, which owns the Millstone Power Station in Waterford and the new fuel-cell plant in Bridgeport.

Together they blocked legislation they say would have increased consumer energy costs, undermined a much-needed discussion on the state’s energy future and awarded an $84 million advantage to nuclear power.

A close look at the trajectory of Senate Bill No. 34 offers a glimpse into how deals are made, or killed, in the Capitol.

When the bill was unveiled on the Senate floor at 7 p.m. on April 29, it was the first look at legislation that had neither a public hearing nor a written summary. Throughout the 23-week legislative process, An Act Requiring a Study of the Adequacy of Energy Supplies in the State seemed a benign proposal introduced by the Energy and Technology Committee.