For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

A federal judge ruled Tuesday to overturn a ban on coal shipping through Oakland, California—which could pave the way for the city’s port to become one of the largest coal-export facilities in the country.

Judge Vince Chhabria determined Oakland’s coal-shipping ban, instituted in 2016, violates a contractual agreement between the city and developer Phil Tagami, who filed the suit against the city and was working to move millions of tons of coal from Utah, through Oakland, and off to Asia every year.

Chhabria said the Oakland City Council didn’t have enough evidence when it put the ban in place to validate its rationale for the measure—that coal shipping would pose a significant danger to residents—and in his decision, he wrote that the city’s records are “riddled with inaccuracies, major evidentiary gaps, erroneous assumptions, and faulty analyses.”

The port handles about 2.5 million shipping containers per year, holding all kinds of commercial goods, including food and clothing. In 2012, Tagami won a contract to build a multi-commodity shipping facility, Oakland Bulk & Oversized Terminal LCC (OBOT), on the former Oakland Army Base. At the time, he assured the city he had no interest in shipping coal. Then in 2015, his company sought a $53 million deal with coal-mining counties in Utah which would raise US coal exports by an estimated 19 percent, according to the Sierra Club.

As Mother Jones previously reported, the 2015 deal was met with immediate opposition:

A wave of anti-coal protests followed OBOT’s deal, and the next year the city passed an ordinance banning the storage and handling of coal, citing “substantially dangerous” health conditions caused by coal dust. City neighborhoods, including West Oakland, already “bear the brunt of health-related impacts” caused by industry, the ordinance says, and see disproportionately higher rates of asthma, premature births, and cardiovascular disease.

In response, Tagami sued—but his victory this week is somewhat complicated. Tuesday’s decision overturns the coal-shipping ban, but the city is still free “to pursue future regulation of the project so long as it complies with its legal obligations, including any legitimate contractual obligations to the project developers,” writes Chhabria. The city has not yet announced if it has plans to appeal the decision.

“Oaklanders understand that a coal export terminal will have horrific impacts on the health and safety, indeed the very lives, of West Oakland residents, particularly children, who are disproportionately African American and other people of color,” Oakland City Attorney Barbara Parker told Mother Jones in an email in January.

Here’s the full, 37-page decision: