Gov. Ralph Northam (D) has brokered an agreement on a bill to restore state regulation of electric utility rates, but the consumer protection office of Attorney General Mark Herring (D) contends that the measure remains a bad deal for ratepayers.

Northam says the proposed legislation balances the need to keep rates low with the obligation to upgrade the state's electricity grid and invest in renewable energy such as wind and solar.

But Herring's office said the package doesn't adequately protect consumers and could actually let the utilities charge ratepayers twice for the same expenses.

The legislation is among the most ambitious the General Assembly is tackling this year, a sweeping recasting of the state's relationship with its biggest regulated monopoly that will affect customers' power bills for a decade.

It would undo a rate freeze the legislature approved in 2015 when Dominion Energy, the state's biggest utility, successfully argued it needed a cushion against unpredictable costs it could face under the now-defunct federal Clean Power Plan. As a result of that freeze, the utilities raked in hundreds of millions in excess profits.

Under the proposed measure, the State Corporation Commission would once again review the rates of Dominion and the state's other provider, the far smaller Appalachian Power. But the SCC would conduct the review every three years instead of every two, as it did before. And if it found that the utilities had overcharged customers, instead of refunding that money, the utilities could use it to invest in alternative energy such as wind and solar or for upgrading the power grid.

In return, ratepayers would get money back for the excess profits that the power companies earned under the rate freeze. That amount has crept up over the past two weeks as the legislation has been renegotiated; the latest version returns $200 million to Dominion customers, plus another $125 million the company is expected to get from federal tax reform.

In addition, Dominion would greatly expand its Energy Share program to help customers with financial hardships pay their bills, and commit to $870 million in energy efficiency programs over the next decade. The plan would also set big goals for developing solar energy, aiming for some 5,000 megawatts, or about 10 times the amount currently under development.

Mark Webb, a Dominion senior vice president, said the package is better for consumers than simply returning the utility to SCC oversight because it would keep rates stable. "It gives a pathway to transform the grid and build renewables in a way that lessens impact on customer rates," he said.

Under the old system, he said, every element of the plan would require separate review by the SCC and could lead to changes in consumer rates.

The legislation that a Senate committee considered Monday incorporated the recommendations of a stakeholders group convened by Northam that included the utilities as well as industry, conservation and consumer groups.

On Monday, a handful of advocacy groups, including the League of Conservation Voters and the Natural Resources Defense Council, said they now support the legislation because of its commitment to renewable energy. Others remained unconvinced.

The legislation is moving quickly. It hit a Senate subcommittee Monday morning and the full committee in the afternoon. A few senators complained that they were being asked to quickly decide something that the SCC staff would normally review in depth.

Senators — and the attorney general's office — also disagreed on how to interpret a central aspect of the legislation: whether it would allow Dominion to "double dip," or charge customers twice for the same costs.

A lobbyist for Dominion, Jack Rust, assured the committee that it would not.

Sen. Richard L. Saslaw (D-Fairfax), one of the sponsors of the bill along with committee chairman Sen. Frank W. Wagner (R-Virginia Beach), later assured his colleagues that they should listen to Rust, a former delegate who helped craft the legislation.

"If he tells you that this thing cannot be double counted, you can pretty much take that to the bank," Saslaw said.

But Herring's office and the SCC interpret the legislation differently. They say that if Dominion was found to have overcharged customers by $100 million, the proposed law would let the utility invest all that money in new ventures such as solar energy instead of returning it to ratepayers. But it would also be able to build the $100 million investment into base electricity rates — in effect, double-dipping.

"We're concerned that the bill as written opens the door to effectively charging consumers twice for the same investment," said Michael Kelly, a spokesman for Herring.

Brian Coy, a spokesman for Northam, said the attorney general evaluates the legislation from a different perspective. "Their concern is really focused very narrowly on that ratepayer piece," Coy said.

Northam "is looking at a broader range of issues," he said, including how to get the utilities to make massive investments in renewable energy and upgrading the electricity grid. He said the governor believes the legislation does not permit Dominion to double-dip on its investments.

Sen. Richard H. Stuart (R-Stafford) was not convinced.

"I can't get past that we're not giving money back to rate payers and not giving the SCC the oversight they should have," he said, adding that he regretted voting for the rate freeze in 2015. "We made a mistake before and I think we should thoroughly correct that mistake."

He and three other Republicans voted against the bill, SB966, but it cleared the committee 10-4 and will advance to the Senate floor. A similar bill in the House of Delegates will come before a committee Tuesday.

There is almost certain to be more opposition as the measures advance. Dominion became a target in last year's elections for its outsize influence in Richmond. The company gave more than $50,000 in 2017 for Northam's campaign and another $50,000 in December for his inauguration, according to the Virginia Public Access Project.

In the past two years it gave $35,000 to the campaign coffers of Wagner, who sponsored the bill, and $55,000 to Saslaw, a co-sponsor, according to the project. It gave $24,000 to Del. Terry G. Kilgore (R-Scott), who is carrying the House version of the bill.