In a court hearing billed as one of the most far-reaching legal debates on climate change, attorneys for petroleum giants told a San Francisco federal judge Wednesday that human activities are clearly responsible for global warming, but that the science isn’t sophisticated enough to point fingers at big oil.

F ive oil companies including Chevron and ExxonMobil argued that because the heating of the planet is a “collective” problem, legal efforts by the cities of San Francisco and Oakland to wring billions of dollars in damages from fossil-fuel firms for coastal flooding are misguided.

U.S. District Judge William Alsup ordered the unusual climate “tutorial” to better understand a pair of lawsuits that the cities have filed against the companies. Oakland and San Francisco are among several California communities suing the industry’s heavyweights for making products that have heated the atmosphere and raised sea levels. They want the firms to pay for losses from past and future flooding.

Legally, the issue of climate accountability remains largely unsettled, with enormous financial implications for the fossil-fuel industry as well as for coastal cities. San Francisco estimates that reinforcing a three-mile seawall along the Embarcadero to keep homes and businesses above water will cost $500 million over the next several years and $5 billion in coming decades. Improvements elsewhere will be similarly expensive.

Interest in Wednesday’s hearing was so high that a live video feed was set up in a second courtroom at the federal courthouse on Golden Gate Avenue to accommodate the crowd.

Chevron atttorney Ted Boutrous didn’t dispute that humans are contributing to climate change. With support from fellow defendants ExxonMobil, Shell, BP and ConocoPhillips, he said Chevron agreed with assessments by the Intergovernmental Panel on Climate Change, one of the world’s foremost authorities on the subject. The panel has determined that greenhouse gas emissions from industries such as oil, gas and coal have probably warmed the planet and caused oceans to rise, and will continue to do so.

However, Boutrous pointed to uncertainty on the part of the panel and others about how bad sea level rise will be. For example, he noted, the state of California issued a recent report that said the chances of water levels rising more than 3 feet by the end of the century in the Bay Area are less than 50 percent.

Boutrous also cited findings by the climate change panel that stopped short of attributing the increase in greenhouse gas emissions since the 1950s to specific businesses.

“They don’t say it’s the production and the extraction” of oil and gas that are to blame for rising temperatures, Boutrous said. It’s broader than that, he suggested: The driver of the warmer atmosphere is economic growth around the globe, “the way people are living their lives.”

Unlike the oil companies’ lawyers, attorneys for San Francisco and Oakland did not participate in the conversation. Instead, they called on three climate scientists to present the cities’ view.

Their outlook was largely consistent with what the oil companies had to say, except their projections were more certain and their accounting of blame ran deeper. Oxford University Professor Myles Allen said scientists are now capable of attributing specific amounts of global warming to specific businesses, which could implicate the five defendants.

“The contributions from individual companies have increased rapidly,” Allen said.

The experts did not delve into the two cities’ legal claims that the fossil-fuel industry has long known more about climate change than it has disclosed. The lawsuits allege that oil firms covered up evidence linking their products to the problem and sought to block regulations to limit greenhouse gases.

Judge Alsup, who has a history of probing deeply into the minutiae of technical issues, asked the two sides to answer eight questions about climate change during the five-hour session. The inquiries ranged from what caused the ice ages to what happens to the exhaust from automobile tailpipes.

“This is a serious proposition to educate the judge,” said Alsup, who will decide later whether the cities can proceed with their suits.

Attorneys for the oil companies are hoping that Wednesday’s debate is ultimately irrelevant. On Tuesday, the firms filed a motion to dismiss the lawsuit on grounds that the case is not an issue for a judge but for regulatory agencies.

Federal courts have ruled before that greenhouse gas emissions should be governed by the Environmental Protection Agency. The cities say that emissions constitute a public nuisance and that their cases belong in the courts.