Exxon Mobil prevailed on Tuesday in a lawsuit in which the energy giant was accused of downplaying the toll climate change regulations could take on its business.

A judge said the New York state attorney general did not prove the company deceived investors – but also did not excuse it of responsibility for global heating.

The office of New York’s attorney general, Letitia James, did not prove “that Exxon Mobil made any material misstatements or omissions about its practices and procedures that misled any reasonable investor”, state judge Barry Ostrager wrote.

“Nothing in this opinion is intended to absolve Exxon Mobil from responsibility for contributing to climate change through the emission of greenhouse gases,” he said. “But Exxon Mobil is in the business of producing energy, and this is a securities fraud case, not a climate change case.”

Exxon Mobil hailed the ruling in a trial it said stemmed from a “baseless investigation”.

“We provided our investors with accurate information on the risks of climate change,” the Irving, Texas-based company said. “Lawsuits that waste millions of dollars of taxpayer money do nothing to advance meaningful actions that reduce the risks of climate change.”

James’s office did not immediately issue a statement.

The Democrat accused Exxon Mobil of essentially keeping two sets of books, telling the public it was fully taking into account the costs of potential climate regulations in a warming world while lowballing those costs as it made investment decisions and assessed the value of its oil and gas reserves.

Exxon Mobil said it did nothing wrong, took climate change seriously and had no incentive to underestimate its future costs.

“We would be misinforming ourselves,” former chief executive and ex-secretary of state Rex Tillerson testified in October.