In a case with major implications for Utah’s coal producers, a federal judge in California has ordered a trial over the city of Oakland’s prohibition on shipping coal through its ports on the San Francisco Bay.

After hearing arguments on motions that could have resolved the costly lawsuit Wednesday, U.S. District Judge Vince Chhabria decided instead to hear testimony on a key claim raised by developer Phil Tagami, who holds contracts with Oakland to build an export terminal on the former Oakland Army Base.

The judge has set aside four days starting Tuesday to try the developer’s claim the city breached its contracts with him.

The city banned coal in 2016 after word got out that four coal-producing Utah counties were helping finance the project, to the tune of more than $50 million. Although city officials were in the dark about coal’s role, Utah’s largest producer Bowie Resource Partners turned out to be the central player in the terminal project, known as Oakland Bulk and Oversized Terminal, or OBOT.

After the project’s coal connection was exposed, Bowie still downplayed its involvement and proponents claimed coal was just one of several commodities that might pass through it. But recent court filings have brought the true extent of Bowie’s role into full focus. The coal producer owns the company, Terminal Logistics Solutions, that would operate OBOT, and is paying the developer’s legal costs, with Utah coal envisioned as the project’s “anchor tenant.”

Documents show proponents hid the coal connection to avoid opposition from climate activists seeking to shut down dirty energy sources. The tactic backfired when the Oakland City Council learned the truth and banned coal handling in the city.

Backing the city are several environmental and social-justice groups, along with California Attorney General Xavier Becerra, who filed an amicus brief in the lawsuit.

“Breathing clean air should not be a privilege for the few, but a right for all. Unfortunately, in Oakland, people of color would have to bear the brunt of the pollution emitted by the handling of coal and petroleum coke at the Bulk Oversized Terminal,” Becerra posted Monday on Twitter.

Seeking to overturn the ban, Tagami’s suit asserts three separate claims: that Oakland’s coal ban breaches the developer’s agreements with the city, which give his firm what he claimed is a “vested right” to move whatever commodity he chooses through the terminal, subject to relevant permits and existing law; that the coal ban is trumped by federal laws on the handling and transport of hazardous substances; and that the coal ban violates a clause of the U.S. Constitution that governs interstate commerce.

But after Wednesday’s hearing, the judge said he will limit the trial to Tagami’s breach of contract claims and reserve judgment on the other two.

Oakland officials contend the agreement with Tagami preserves their authority to “prevent substantially dangerous health and safety conditions.” The coal ban arose after a year-long open process weighing the impact of coal dust on public health.

“The Council properly rejected OBOT’s attempt to force Oakland residents already disproportionately burdened by pollution to be canaries in OBOT’s coal mine,” the city’s lawyers wrote in a pre-trial brief.

Oakland’s brief also chided the developer and his “aligned entities” for labeling key court documents in the case as confidential, insisting the public has a right to witness the entire court proceeding.

OBOT’s lawyers counter that the city’s review in support of the coal ban failed to produce substantial evidence that the shipments posed a risk, and instead reached its conclusion for political reasons.

Tagami needs to prevail on just one of his three claims to overturn the coal ban. But if he wins, OBOT still faces obstacles to building a coal-centered terminal. The project would have to go through a complex permitting process and secure $250 million in financing from an investment community that has grown increasingly skeptical about coal.

Utah’s $53 million investment was seen as a way to attract further financial backing from pension funds, according to Ted Franklin, a coordinator with the group No Coal in Oakland.

“It was holding mirrors up to mirrors,” Franklin said. “It was all about raising the other $200 million.”

Utah lawmakers have since diverted the money formerly earmarked for the Oakland terminal to other purposes, but it can still be tapped for projects geared toward moving natural resources extracted in Utah. Several such projects are under development.