More than a dozen states, counties and cities, from fire-ravaged California to flood-prone South Carolina, are suing oil companies to hold them responsible for the damage they say their products have caused due to climate change.

In a wave of recent lawsuits, local governments are demanding some of the nation’s biggest energy firms pay for the cost of dealing with increasing temperatures and rising seas.

The litigation, bolstered by science and likened to cancer suits in the 1990s against Big Tobacco, has the potential to be a financial reckoning for an already struggling industry in the United States.

But prosecutors face significant legal hurdles to prove in court that the oil industry deceived the public on climate change and needs to be held liable for their products’ emissions.

The latest to file suit is Connecticut, which on Monday alleged that ExxonMobil, the nation’s largest oil and gas company, misled the public on climate change for decades. William Tong, the state’s attorney general, said ExxonMobil’s actions left the state, with more than 600 miles of coastline, ill-prepared for sea-level rise and more intense storms.

“It’s well past midnight to adopt a much better approach and strategy with respect to energy,” Tong (D) said.

“By ExxonMobil’s reckoning, climate change is not as much of a threat as anybody thinks it is, and in some cases isn’t real,” he added. “Because they’re able to convince large swaths of people in Connecticut and across the country, we didn’t adopt those renewable sources of energy, and we didn’t move to a carbon-free economy, as quickly as we should have.”

But the oil industry contends that using the courts to force specific firms to shoulder the cost of a worldwide problem such as global warming, for which everyone bears some responsibility, is unrealistic.

“Lawsuits are precisely the wrong mechanisms to determine the appropriate way to address climate change,” said Scott Segal, an attorney with Bracewell LLP, which often represents energy companies in Washington. “It is impossible to determine what emissions source results in what harm, meaning that causation is impossible to determine.”

Connecticut is among a half-dozen states that have brought suits against oil companies, most of which are still winding their way through the courts. Pursuing various legal strategies, each is attempting to use decades-old laws to chart new legal territory to hold oil companies accountable.

In a separate filing last week, Delaware, one of the nation’s lowest-lying states, is claiming that 31 fossil fuel firms failed to warn of the dangers their products posed and created a public nuisance — a charge more typically brought against noisy neighbors — for their climate-warming pollution.

“We were very conscious about fashioning this lawsuit as a traditional damages action,” said Kathy Jennings (D), Delaware’s attorney general. “The only differences here are that the damages are catastrophic.”

Massachusetts, Minnesota and Rhode Island — the last of which is the fastest-warming state in the Lower 48 — separately have their own suits, as do major cities such as Baltimore, Oakland, Calif., and San Francisco and smaller municipalities such as Boulder, Colo.; Hoboken, N.J.; and Imperial Beach, Calif.

The coastal South Carolina city of Charleston, where inundated streets have become common after storms, last week became the first in the South to file a climate lawsuit against Big Oil companies, arguing that two dozen fossil fuel firms should bear some of the burden of repairing flood damage.

“I handled their products, and I can tell you from firsthand experience that these companies were not in any way, shape or form sharing information with us about the dangerous flooding and extreme weather their products would cause,” said Charleston Mayor John Tecklenburg (D), who founded an industrial lubricants business in the 1970s.

Driving the legal actions from the mostly Democratic-controlled states and cities is inertia in Congress, which has yet to pass major legislation addressing the causes or effects of climate change. In turn, activists are increasingly hoping to make progress by demanding that Democrats bring oil companies to court.

In New Jersey, for example, advocacy groups took out a full-page ad in the Star-Ledger last week calling on Gov. Phil Murphy (D) to “make them pay their fair share.” During the Democratic Party’s presidential primaries, Sen. Bernie Sanders (I-Vt.) and Sen. Elizabeth Warren (D-Mass.) amplified those pleas by promising federal prosecution against fossil fuel executives.

The spate of suits also comes after investigations by InsideClimate News and the Los Angeles Times found internal documents showing ExxonMobil privately understood the risks climate change posed decades ago but continued to publicly deny that science.

The cases are slowly moving through the courts, with the central question so far being where they should be heard. The oil companies want a federal venue, where Supreme Court precedent would make it hard for the cases to gain traction, while attorneys general have sought to keep cases in state courts.

“Corporations want to nationalize and want to make it a bigger issue and move these things in the federal court,” said David Bookbinder, chief legal counsel of the Niskanen Center, part of the legal team representing Boulder and two Colorado counties suing ExxonMobil and the Canadian oil firm Suncor Energy.

So far, at least three appellate courts have kept the cases out of the federal system. The Supreme Court will ultimately settle the jurisdiction question after the oil companies petitioned it last month to block the cases from proceeding.

Even if they remain in the states, climate lawsuits have a history of eventually losing steam.

In January, a federal appeals court threw out a 2015 lawsuit from nearly two dozen young people looking to force the U.S. government to take more aggressive action to curb emissions. The plaintiffs had billed it as the “trial of the century” before its dismissal.

And a month earlier, ExxonMobil prevailed over New York after the state alleged the company misled investors about how it calculated the financial risks of future climate regulations.

“Legal proceedings like this waste millions of dollars of taxpayer money and do nothing to advance meaningful actions that reduce the risks of climate change,” ExxonMobil spokesman Casey Norton said. “The claims are baseless and without merit. We look forward to defending the company in court.”

The office of New York Attorney General Letitia James (D) fell short even with a powerful anti-fraud law called the Martin Act, which does not require prosecutors to prove intent, at its disposal. The loss has discouraged other states from using their own investor-protection laws to prosecute oil firms.

“We certainly did look into it,” said Jennings, the top prosecutor in Delaware, adding that her office instead “chose to really directly focus on the harm to our residents” rather than to shareholders.

Tong, the top law enforcer in Connecticut, says his case, which alleges ExxonMobil duped drivers of gasoline-powered cars on the environmental dangers of petroleum products, is strong because the state’s consumer protection law has no statute of limitations, allowing his office to plumb for decades of records.

“We are open to any strategy that is going to work,” Tong said.