Just before a critical hearing to determine the fate of a pair of climate lawsuits in California, the United States government has weighed in as a heavyweight ally on the side of the fossil fuel companies.

Lawyers from the Justice Department's Environment and Natural Resources Division filed a friend of the court brief last week in support of five of the world's largest oil and gas companies, which are seeking to have lawsuits by the cities of San Francisco and Oakland dismissed.

U.S. District Court Judge William Alsup is scheduled to hear arguments on Thursday on a motion by the companies to throw out the cases.

Federal lawyers argue in their brief that if the two lawsuits succeed, it could stymie domestic and international energy production.

"The United States has strong economic and national security interests in promoting the development of fossil fuels, among other energy resources," according to the 24-page brief filed May 10.

The brief cites President Trump's March 2017 Presidential Executive Order on Promoting Energy Independence and Economic Growth, suggesting the fight being waged by the two cities against the companies runs counter to the administration's support of unrestricted fossil fuel development.

"It's hardly surprising that Donald Trump's Justice Department is cozying up to Big Oil," said John Coté, a spokesman for the San Francisco City Attorney's Office. "But this a legal matter, not a political one."

The sister cities filed suit last year against ExxonMobil, Chevron, ConocoPhillips, Royal Dutch Shell and BP, blaming them for the effects of climate change. The parallel lawsuits seek billions of dollars to build sea walls and other coastal infrastructure to protect neighborhoods and property from sea level rise.

The lawsuits claim the companies produced fossil fuels in disregard of their own understanding of the consequences of global warming.

"This egregious state of affairs is no accident," according to the San Francisco lawsuit.

"Defendants have produced massive amounts of fossil fuels for many years. And recent disclosures of internal industry documents demonstrate that they have done so despite knowing since at least the late 1970s and early 1980s if not earlier that massive fossil fuel usage would cause dangerous global warming."

The lawsuits are part of a trend across the country in which cities and counties are turning to the courts to hold fossil fuel companies responsible for damages associated with climate change. More than a dozen similar lawsuits are now on the books from Washington State to New York.

The Trump administration's lawyers argue the San Francisco and Oakland lawsuits have the potential to "interfere with the United States' ongoing attempts to address the impacts of climate change, both domestically and internationally."

Authority rests with the U.S. Environmental Protection Agency to control greenhouse gas emissions, and the two lawsuits seek to usurp that power and set a precedent that could fracture regulatory authority, they argue.

"If these Cities may properly allege injuries from climate change, then so can every person on the planet. Federal courts are poorly equipped to handle this multitude of cases and the associated complex scientific, economic, and technical issues," the administration's lawyers wrote.

"Nor should courts be the institutions to resolve the policy questions raised by such cases. Moreover, balancing the Nation's energy needs and economic interests against the risks posed by climate change should be left to the political branches of the federal government in the first instance."

Pat Parenteau, a professor of environmental law at the Vermont Law School, said the clout of the federal government cannot be overlooked, though he added the brief contains little substance.

"I think the judge will look at it, but will see that it does not uncover the secrets to the case," said Parenteau, who is a legal adviser on several California climate cases, not including the Oakland and San Francisco litigation.

He called the government's claims about losing control of foreign and domestic policy if the lawsuits succeed nothing more than red herrings.

"What the government is trying to do is get the judge to take his eye off the ball," Parenteau said. "The question [in these cases] is not about policy, but about the industry's conduct. Was the public misled?"

The lawsuits seek damages based on California's public nuisance law. They argue that the companies created a public nuisance because the greenhouse gases generated by fossil-fuel burning are responsible for sea level rise that threatens their cities. The suits claim the industry knew the risks associated with its products yet sold them anyway.

But the Trump administration says that presents a "thorny" legal question. The production of fossil fuels is authorized by law on federal land, it argues, so how then could that same activity be a public nuisance.