ExxonMobil lost its appeal on Tuesday to keep records held by its auditors away from the New York attorney general's climate fraud probe.

The documents could afford a candid—and perhaps damaging—glimpse into Exxon's private calculations of the business risks posed by climate change. They could contain anything from a smoking gun email to plodding, yet revealing, discussions related to Exxon's posture on global warming, including whether the company was adequately calculating climate change risks for investors. Exxon still has another opportunity to appeal.

Investigators for state Attorney General Eric Schneiderman subpoenaed PricewaterhouseCoopers records pertaining to Exxon's assessment of climate change as part of an investigation into Exxon that was opened in 2015.

Exxon fought to have the subpoena voided, arguing the records were privileged communications with its auditor and should be kept from the eyes of investigators. The oil giant, headquartered in Dallas, based its argument on a Texas law that grants a privilege to auditors and clients much like that between a lawyer and client.

A state court judge agreed with Schneiderman's office that there was no such protection afforded Exxon under New York law and ordered the documents handed over last year. Exxon appealed that decision.

The appeals court, which had been considering the case since a hearing in March, rejected Exxon's argument.

"In light of our conclusion that New York law applies, we need not decide how this issue would be decided under Texas law," the two-page decision said.

Exxon did not respond to a request for comment.

Caroline Nolan, a spokeswoman for PwC, said the company had no comment.

The accounting firm, which has expertise in climate-related risks faced by fossil fuel companies, has remained neutral in the legal fight but has honored Exxon's request not to turn over documents pending the outcome of the litigation.

Exxon has been fighting investigations by Schneiderman and Massachusetts Attorney General Maura Healey both in federal court and state courts.

Schneiderman opened his financial fraud investigation of Exxon in November 2015 by subpoenaing decades of records related to Exxon's history of research into and knowledge of climate change. The investigation revolves around whether the company misled shareholders and the public about the risks of climate change.

The attorney general followed up with a subpoena to PwC nine months later seeking documents related to the auditors' work for the oil giant. Records sought under the subpoena include documents about accounting and reporting of oil and gas reserves, evaluation of assets for potential impairment charges or write-downs, energy price projections and projected cost estimates of complying with carbon regulations.

Attorneys for Exxon argued that the judge's ruling in October to force PwC to surrender documents "eviscerates" the accountant-client privilege afforded by the laws of Texas, where Exxon is headquartered.

New York investigators disagreed and argued that PwC should feel a moral obligation to cooperate. "As a certified public accountant, PwC 'owes ultimate allegiance to [a] corporation's creditors and stockholders, as well as to the investing public,'" the attorney general's office responded.

Exxon could file additional appeals up to the New York Supreme Court or allow PwC to comply with the subpoena.

While it is unclear what Exxon's next move may be related to the PwC documents, the company is also asking a judge to seal five subpoenas issued by Schneiderman's office in connection with its investigation, which has grown to include missing emails from former Exxon CEO Rex Tillerson, now U.S. secretary of state.

The attorney general's office disclosed last week that it has expanded its probe to determine whether Exxon may have destroyed emails from Tillerson's "Wayne Tracker" email alias. Investigators are trying to determine why several weeks of emails from that account are now missing. As part of that widening investigation, the attorney general's office revealed that it has subpoenaed a number of Exxon officials.

Exxon offered few clues in its request to the New York judge overseeing the case as to why the documents and the arguments by company lawyers justifying the sealing must remain secret.