Correction: An earlier version of this story incorrectly stated that a law passed by the Virginia General Assembly allows Dominion Power to avoid giving refunds or rate reductions to customers. The law could allow that under some circumstances.

Dominion Power, among the most influential players in Virginia politics, scored a quiet but important regulatory victory in the General Assembly this year that is likely to cause consumer rates to rise.

The measure could allow Dominion to avoid giving refunds or rate deductions to customers by deducting most of its research spending from its balance sheets.

According to supporters, the bill encourages the giant utility to make bigger investments in clean energy. But opponents — including environmentalists, large industrial electricity users and state Attorney General Mark R. Herring — argued that the change harms consumers. Some said it was a ruse to help Dominion avoid sharing profits.

Lawmakers overwhelmingly approved the bill this week, sending it to the desk of Gov. Terry McAuliffe (D).

“The ratepayers are clearly going to be better off with this bill than without it,” said Sen. Walter A. Stosch (R-Henrico), who introduced the legislation in the Senate.

At issue is a complex measure to allow Dominion to count the expenses of nuclear energy research toward costs over the current, two-year rate period. That would let the company deduct about $400 million from its profits and probably avoid a refund to consumers the next time the State Corporation Commission, which oversees utility rates in Virginia, looks at Dominion’s balance sheet. The company must issue rebates if its profits exceed a certain level.

Supporters, including most members of the General Assembly and, in particular, both chambers’ powerful commerce committees, said the change will save customers money in the long run because nuclear power is cheaper and, many argued, cleaner than gas.

Opponents argued that the bill allows Dominion to circumvent 2007 legislation giving the SCC power to crack down on profits deemed excessive. In November, the SCC projected that Dominion would have excess profits of $280 million in the two-year regulatory period that ends this year — a figure that would have triggered savings for customers under the old law.

But David Botkins, a Dominion spokesman, said that “customers are the winners with this bill” because it helps facilitate the building of another nuclear unit at Dominion’s North Anna plant.

Under the 2007 law, if the utility earns profits above a certain amount in a year, the SCC can order a refund to consumers. If profits are excessive for consecutive two-year cycles, the SCC can order a rate cut.

By writing off 70 percent of the nearly $600 million that Dominion says has been spent on nuclear and wind-power generation between 2007 and 2013, Dominion can avoid a possible refund in 2015 and a rate cut in 2017.

“It sends a signal to the commission being that . . . if they don’t like the way the [rate] case comes out, if they don’t like the way the rules are shaping up to come out, they will just come down here and change the rules,” Stephen D. Haner, a lobbyist for Newport News Shipbuilding, said during committee hearings. The shipyard is one of Dominion’s largest industrial customers.

Opponents argue that the proposed reactor may never be built. It does not yet have federal approval, Dominion has not committed to its construction, and the company’s other two North Anna reactors were briefly shut down by an earthquake in 2011. Even if it is built, they say, current customers shouldn’t pay for utilities that they may never use.

A related bill creates the same breakdown for offshore wind-power facilities. While it has raised the same objections, the amount of money at stake is minuscule compared with the funds invested in the nuclear plant.

Dominion’s sway in the legislature is long-standing; lobbyists for other causes speak of the company’s clout with jealousy. Close to a million dollars went from Dominion to campaigns in the state last year, split about evenly between parties. Stosch, for instance, was given $5,000; since 1996, Dominion has given him $82,248.

In addition, the company last year spent $91,974 entertaining lawmakers with Redskins tickets, golf tournaments and steak dinners.

“Here we are with a past governor under indictment, with a legislature looking at ethics reform, and basically the largest lobbying effort in the state getting a major benefit with almost no questions asked,” said Glen Besa of the Sierra Club. “What’s the irony of that?”

Herring’s opposition to the measure represented a rare instance where the new officeholder has taken a stance apart from leadership in both parties.

The bill “strips the SCC of important consumer protection powers related to rate-setting and the extent to which Dominion can pass the costs of certain projects on to its customers,” Michael Kelly, spokesman for the attorney general, said.

McAuliffe has not announced a position on the legislation.

Del. R. Lee Ware Jr. (R-Powhatan) was the only member of the either chamber’s commerce committee to consistently oppose all versions of the legislation. “Simply put, I think we should not inject ourselves in this fashion in the regulation of utilities,” he said.

When it was clear that killing the legislation was impossible, opponents fought for a version that suggested rather than mandated that the SCC make the change. That alternative failed in the Senate Tuesday.

“I’m not sure that we are being prudent,” Sen. John C. Watkins (R-Powhatan) said during the debate. “We have taken the discretion away from the commission and given it to the company.”

Sen. Phillip P. Puckett (D-Russell) expressed concern that the bill was an “accounting gimmick” to help Dominion, but he was convinced that it was necessary to get the nuclear facility built.

“Sometimes you make the decision based on what you hope the outcome will be,” he said. “It was a tough call.”