(Reuters) - A federal court in California dismissed climate change lawsuits by the cities of San Francisco and Oakland against five oil companies, saying the complaints required foreign and domestic policy decisions that were outside its purview.

The ConocoPhillips oil refinery in San Pedro, California March 24, 2012. REUTERS/Bret Hartman

San Francisco and Oakland sued Chevron Corp, Exxon Mobil Corp, ConocoPhillips, Royal Dutch Shell Plc, and BP Plc last year seeking an abatement fund to help the cities address flooding they said was a result of climate change.

Judge William Alsup of the U.S. District Court for the Northern District of California said in the ruling that the dangers raised by the complainants were real and worldwide, and both parties accepted the science behind global warming.

“(However), the problem deserves a solution on a more vast scale than can be supplied by a District Judge or jury in a public nuisance case,” Judge Alsup said.

The suit was one of several filed by cities and local governments around the country that argued in part the production of fossil fuels had led to rising tides that damaged shorelines, roads and other properties requiring remediation.

Alsup, who held a primer on climate change during the case, wrote that although scientists agree burning fossil fuels is raising ocean levels, the suits “could interfere with reaching a worldwide consensus” on the social pros and cons of fuel use.

Chevron, which took the lead in fighting the case, called the decision “important and well-reasoned” and said although the ruling is not binding on other courts, judges in similar cases “should follow Judge Alsup’s lead and dismiss their cases as well,” according to spokesman Sean Comey.

Richard Wiles, executive director of the Center for Climate Integrity, an advocacy group that supports the lawsuits, called the decision disappointing, but added: “This fight is just getting started and we expect to win.”

A Shell spokeswoman said the company regards climate change to be a complex problem, which is not an issue for the courts but requires sound government policy.

The case is City of Oakland V. BP, Chevron and others, U.S. District Court, Northern District of California, No. 17-CV-06011.