SAN FRANCISCO — A federal judge in California on Tuesday struck down the city of Oakland's ban on coal shipments at a proposed cargo terminal, siding with a developer who wants to use the site to transport Utah coal to Asia.

In a scathing ruling, U.S. District Judge Vince Chhabria in San Francisco said the information the city relied on to conclude the coal operations would pose a substantial health or safety danger to the public was "riddled with inaccuracies, major evidentiary gaps, erroneous assumptions, and faulty analyses, to the point that no reliable conclusion about health or safety dangers could be drawn from it."

The city attorney's office did not immediately have comment.

City leaders approved construction of a rail and marine terminal in 2013 as part of a larger makeover of an Army base that was shuttered in 1999.

The $250 million project in west Oakland — a historically African-American neighborhood that is among the poorest and most polluted in the region — was expected to bring thousands of construction and shipping jobs.

Oakland officials said coal had never been mentioned as a possibility. Lawyers for the developers said city officials always knew there would be a mix of goods, including coal.

Concerned about air pollution caused by coal dust, the city moved in 2016 to ban shipments of coal and petroleum coke, a solid derived from oil refining. The decision came after Utah lawmakers approved a $53 million investment to help ship the state's coal through Oakland to Asia.

One of the developers of the project, Phil Tagami, sued for breach of contract. Tagami has deep ties to the city and California Gov. Jerry Brown, a former Oakland mayor.

Brown, whose environmental efforts have made him a global leader in the fight against climate change, has not spoken out publicly against the project.

Chhabria agreed with attorneys for the developers that the city relied on a flawed analysis to justify its ban. As an example, he said the city failed to factor in covers on the coal-carrying rail cars in its emissions estimates for the project.

It also had no meaningful assessment of how emissions would actually affect air quality in Oakland, he said.

The city's opposition to coal operations appeared to stem largely from concerns about global warming, but it was "facially ridiculous to suggest that this one operation resulting in the consumption of coal in other countries will, in the grand scheme of things, pose a substantial global warming-related danger to people in Oakland," the judge said.

___

Associated Press writer Sudhin Thanawala contributed to this report.