Two Bay Area counties sued 37 oil, gas and coal companies Monday asserting the companies knew their fossil fuel products would cause sea level rise and coastal flooding but failed to reduce their greenhouse gas pollution.

The lawsuit was part of a coordinated litigation attack by Marin, San Mateo County and the city of Imperial Beach.

The lawsuit, filed in Marin County Superior Court, alleges that “major corporate members of the fossil fuel industry, have known for nearly a half century that unrestricted production and use of their fossil fuel products create greenhouse gas pollution that warms the planet and changes our climate.”

The suit goes on to say that even though the fossil fuel companies knew there was a narrow window to take action before consequences would be irreversible, they engaged in a “coordinated, multi-front effort” to “discredit the growing body of publicly available scientific evidence and persistently create doubt.”

The suit asserts that the fossil fuel companies “have promoted and profited from a massive increase in the extraction and consumption of oil, coal and natural gas, which has in turn caused an enormous, foreseeable, and avoidable increase in global greenhouse gas pollution.”

And the suit states that this greenhouse gas pollution has “substantially contributed to a wide-range of dire climate-related effects including global warming, rising atmospheric and ocean temperatures, ocean acidification, melting polar ice caps and glaciers, more extreme and volatile weather and sea level rise.”

The defendants named in the suit include San Ramon-based Chevron, ExxonMobil, BP and Shell.

Melissa Ritchie, a spokeswoman for Chevron, said the company was aware of the suit, but she provided no response. Other defendants could not be reached immediately.

The suit seeks compensatory damages, punitive damages, disgorgement of profits and lawyers’ fees, but it doesn’t specify how much they might amount to.

Asked if the suits were inspired by the legal action taken by state attorneys general against the tobacco industry in the 1990s, Marin County Supervisor Kate Sears said, “You could certainly think of it that way, because a lot of what these fossil fuel companies did was modeled after what the tobacco companies did.”

“Instead of taking steps to actually do something about the impact of their product,” Sears said, “they launched this multimillion dollar lobbying campaign to discredit scientific evidence about climate change.”

“Sea level rise is here and we’re experiencing it first hand in Marin, as roadways continually flood with king tides and storms,” Sears said in a statement.

According to an assessment of Marin’s vulnerability to sea level rise completed in June, more than 12,000 homes, businesses and institutions could be at risk from tides and surge flooding by the year 2100.

Sears said, “The cost of trying to protect them and the human anguish over those that will be lost, will be shocking and crippling.”

Sears declined to say exactly where the idea for the lawsuits originated although she did say that her conversations with San Mateo County Supervisor Dave Pine played an important role.

Brian Case, a deputy county counsel, said Marin County lawyers will not argue the case in court.

“We’re using outside counsel, Sher Edling; they’re taking it on a contingency basis so the only cost involved is staff time,” Case said. “Our taxpayers are not being asked to front the costs or bear the risk of the lawsuit.”

San Francisco-based Sher Edling specializes in representing businesses, cities and public agencies in high-value environmental cases.

John Lamson, a spokesman for Sher Edling, said, “San Mateo Supervisor Dave Pine and Marin County Supervisor Kate Sears have been discussing how to respond to the impacts of sea level rise for some time.”