Perhaps initially, mayors of some of the nation’s most liberal cities thought they’d struck oil with lawsuits blaming all global warming on a handful of energy companies and claiming billions for future damages. But now, these unfounded cases are getting tossed out of court and some mayors could encounter costly legal problems they never anticipated.

Earlier this year, a Clinton-appointed judge dismissed the cases brought by San Francisco and Oakland, finding that such policy matters would more properly be decided by the legislative and executive branches on the federal level rather than a judge sitting in a California courtroom. More recently, New York City’s complaint was likewise dismissed. Time and again, the public nuisance legal tactic used by these cities has failed.

Nevertheless, in California, San Mateo and Marin Counties, Imperial Beach, Richmond and Santa Cruz have filed lawsuits nearly identical to each other demanding that oil and gas companies pony up billions of dollars to pay for climate change damage that might occur at some point in the future. Or perhaps never. Boulder, Colorado; King County, Washington; Baltimore and the State of Rhode Island have also entered what they see as a game of “lawsuit lotto.”

The gist of their argument is that the companies knowingly contributed to climate change, thus putting citizens and property at risk. As this legal drama has unfolded, the material risks from climate change have become less clear while the financial risk to cities and taxpayers because of this litigation is becoming more distinct.

The only party without a downside are the grasping trial lawyers who shopped these lawsuits. If they lose a case, they lose nothing but the time they’ve invested. If they prevail, they stand to win a contingency fee. In the case of these multi-billion-dollar lawsuits, there’s a jackpot justice potential beyond even their dreams of avarice

The fact that these cities (their taxpayers, in reality) may be required to pay the tab for energy producers’ legal expenses is a shameful waste, because the plaintiffs knew better. In American Electric Power v. Connecticut (2011), the court ruled that the Clean Air Act pre-empts public nuisance lawsuits against corporations for greenhouse gas emissions.

But politicians in the remaining plaintiff cities, perhaps eager to please their ultra-liberal base and so easily beguiled by the trial lawyer come-ons, seem unable to see their own hypocrisy or the yawning pitfalls before them.

Marin County, California, for example, claims in its lawsuit that there’s a 99 percent risk of an epic climate-change-related flood by 2050. Conspicuously missing from Marin County’s municipal bond offering to potential investors, however, is any warning of the potential climate change calamities it so alarmingly alleged in its litigation.

San Mateo County’s lawsuit varies from the cookie cutter template only slightly, pegging the risk of cataclysmic flood at 93 percent within the same time frame. Yet San Mateo County told prospective bond buyers that it’s “unable to predict whether sea-level rise or other impacts of climate change or flooding from a major storm will occur.”

Municipalities engaged in such double-dealing chicanery may find themselves having to answer some very uncomfortable questions. In fact, the Competitive Enterprise Institute has already requested that the SEC launch a bond fraud investigation. Additionally, these cities could find themselves racking up extensive legal fees in defending their blatantly dishonest scheme from countersuits.

Even if the cities, counties and the State of Rhode Island should somehow prevail, their citizens would still come out on the losing side in terms of higher energy prices, lost jobs, and gutted retirement plans invested in American energy companies.

If this succeeds, consumer energy prices would increase, disproportionately harming low-income households in California, which already suffers the nation’s highest poverty rate, and threaten America’s energy producers, thousands of domestic manufacturers, and billions in pension plans and retirement funds that are correctly invested in American energy production. At the same time, the plaintiffs’ cases would not do a thing to impact climate change.

Ironically, thanks to the shift to clean-burning natural gas made possible by fracking, America now leads the world in reducing carbon emissions.

As more light has been shed throughout the course of the legal process, it has become more evident to the public that these sham lawsuits were little more than deceitful attacks designed to kill or wound the energy industry, elevate the careers of politically ambitious progressives and, above all, grab cash for cities and counties plagued by fiscally irresponsible management. Municipalities should respect their taxpayers and drop their frivolous lawsuits now.

In the end, removing the fig leaf will expose these politicians as the cynical, unethical opportunists they are.