Updated

Potentially cleaner rivers or possible higher electric prices.

That is what's at stake in an upcoming federal court ruling in Virginia that could have far-reaching effects on how energy companies dispose of the waste known as coal ash, left over from decades of burning coal. Spurred by high-profile coal ash spills and new federal regulations, utilities are grappling with the disposal of vast amounts of the heavy-metal-laced waste.

In a federal courtroom in Richmond last month, Judge James A. Gibney Jr. heard four days of arguments and complex testimony from numerous experts about what should be done at a Dominion Virginia Power coal ash site along the Elizabeth River in southeast Virginia. He hasn't said when he will rule.

Central to the case are questions about the scope of the Clean Water Act and whether it applies to tainted groundwater connected to rivers and other surface waters.

The lawsuit, according to industry and legal experts, is the first of its kind to go to trial in the U.S., and its outcome could help shape future fights over coal ash ponds and the extent to which certain federal regulations apply.

"It's always been a real gray area the extent you need a Clean Water Act permit for situations where there's leeching of toxics materials into groundwater," said Robert V. Percival, director of the environmental law program at the University of Maryland.

Whichever way he rules, experts said, Gibney's decision is likely to be appealed. But the case could lead to a definitive ruling that affects coal ash disposal around the country.

"This has Supreme Court written all over it," said Patrick Parenteau, a professor at Vermont Law School who specializes in environmental law.

Environmentalists and utilities are often at odds on what coal ash disposal should look like, with environmental groups pushing for excavating unlined coal ash sites near waterways and moving millions of tons of ash to lined landfills, which are less prone to leeching toxic chemicals.

Electric companies say that a one-size-fits-all approach is unreasonable and that there are less expensive alternatives. Utilities argue that capping coal ash sites in place with rainproof liners and other methods can still protect water quality.

Jim Roewer, executive director of the Utility Solid Waste Activities Group, a Washington-based trade group, said the cost of a mandatory coal ash excavation and transportation to lined landfills could easily top a trillion dollars.

"If you had to clean-close all these facilities it would have a huge impact on the industry," Roewer said.

There are coal ash sites around the country, but the issue is of particular importance in the Southeast, which has a disproportionate number of coal ash sites near waterways. Coal ash disposal has gained prominence after a breach of a Duke Energy coal-ash impoundment site in February 2014 caused a major spill on the Dan River, which flows in both Virginia and North Carolina. Last year, Duke pleaded guilty to federal environmental crimes and agreed to pay $102 million in fines and restitution for years of illegal pollution leaking from coal-ash dumps at five North Carolina power plants.

In Virginia, the state's largest electric utility has argued that excavating all of its coal ash ponds would be uneconomical and impractical. Dominion plans to excavate some of its 11 coal ash ponds at four power stations and consolidate them into six closed ponds by 2019, according to spokesman Robert Richardson.

That plan has displeased environmentalists, who have engaged the company in a multi-front fight. At a recent information session about the company's coal ash sites outside Richmond, the state chapter of the Sierra Club set up a mock lemonade stand to serve "coal-aid" as a way, the group said, to "highlight the threats to public health posed by toxic coal ash and the corporate executives responsible for these decisions."

In court, Dominion is fighting a lawsuit from the Sierra Club over what to do with the 3 million tons of coal ash at the Chesapeake Energy Center, a coal-powered power plant that was retired in 2014.

The Sierra Club and its experts have said the site has leeched unhealthy amounts of arsenic into the river for years and needs to be fully excavated. Dominion has countered that there's no proof the coal ash pits are leaking arsenic into the surrounding waters and the coal ash can be safely contained on site.

Getting a clear idea about the potential dangers isn't easy. During the trial, James Golden, the director of operations for Virginia Department of Environmental Quality, was asked by Dominion's lawyer whether he knew arsenic was leaving the Chesapeake site through groundwater and going into surface water.

"No," Golden said.

A few moments later, the Sierra Club's attorney reminded Golden that he'd been asked a nearly identical question at an earlier deposition and gave the opposite answer.

Outside the courtroom, Golden told The Associated Press that arsenic from coal ash could be seeping into surface water, but he hasn't seen any data proving it.

Gibney, the judge, expressed doubts during trial about the merits of forcing Dominion to excavate the site, even if the company is violating the Clean Water Act. Gibney questioned the wisdom of forcing Dominion to spend hundreds of millions of dollars to stop small amounts of arsenic flowing into the river.

But even if they lose, environmentalists say there is value in pursuing this case and others like it.

"Whatever the outcome is, the very fact that Dominion has faced this level of scrutiny and has faced widespread calls to clean up its site would encourage other utilities not to take this same path," said Southern Environmental Law Center senior attorney Frank Holleman.