RICHMOND — Accusing the oil industry of concealing that it knew long ago that gasoline and oil use was warming up the planet, Richmond has joined the ranks of cities and counties suing oil companies to cover the cost of shoring up shorelines from rising sea levels.

Richmond — home to the Chevron oil refinery, largest in the Bay Area — named Chevron, Shell, Exxon-Mobil, BP, Conoco Phillips and 24 other oil, gas and coal companies in a lawsuit filed Monday in Contra Costa County Superior Court.

The lawsuit alleges that the oil companies knew for 50 years that greenhouse gases from widespread fossil fuel use would contribute to rising sea levels, but the industry spent large sums on public relations campaigns to hide the truth.

“The fossil fuel industry could have taken steps to transition to a lower carbon future, but they didn’t,” Richmond Mayor Tom Butt said. “Instead, they continue to spend billions fighting public policies intended to reduce greenhouse gases, even in some cases, while their own assets are endangered by rising seas.”

Richmond is particularly vulnerable to rising sea levels because it has 32 miles of shoreline, more than any city in the Bay Area, as well as 3,000 acres of waterfront parks, Butt said.

Oakland and San Francisco announced similar lawsuits in September that accused the oil companies of contributing to a public nuisance that will cost huge sums to deal with.

Sea level lawsuits against the oil industry also have been filed by the counties of Santa Cruz, Marin, and San Mateo, and the cities of Santa Cruz and Imperial Beach in San Diego County.

A Chevron spokesman dismissed the lawsuits as narrowly focused and counterproductive to solving a serious worldwide problem.

“As we have said, such lawsuits will do nothing to address the serious issue of climate change,” said Braden Reddall, a Chevron Corp. external affairs advisor. “Reducing greenhouse gas emissions is a global issue that requires global engagement.”

Richmond officials said that many coastal communities will need to spend large sums to build or raise seawalls and establish coastal wetlands to blunt the flood risks from rising sea levels.

Linda Kelly, general counsel for the National Manufacturers Association, criticized the Richmond lawsuit as part of a trend of activist attorneys “seeking to score headlines rather than solutions” for climate change.

Kelly said activist attorneys are stretching the limits of “public nuisance” definitions and shopping around the country for favorable state courts in an attempt to blame energy companies for greenhouse gas cases that should be decided by lawmakers, not the courts.

“From Richmond, California, to New York City, activist-driven lawsuits are being filed to undermine manufacturers in America without regard to the facts,” Kelly said.

Denis Cuff covers environmental, water, and outdoor recreation news for the Bay Area News Group. A graduate of Stanford University with a B.A. in communications, he enjoys hiking and cycling in his spare time.