New York’s Attorney General failed to prove that Exxon mislead shareholders over the true cost of climate change, a judge ruled Tuesday, ending the oil giant’s multiyear battle against the state.

“The Office of the Attorney General failed to prove, by a preponderance of the evidence, that ExxonMobil made any material misstatements or omissions about its practices and procedures that misled any reasonable investor,” Judge Barry Ostrager of the trial-level state Supreme Court wrote in his ruling.

“The office of the Attorney General produced no testimony from any investor who claimed to have been misled by any disclosure, even though the Office of the Attorney General had previously represented it would call such individuals as trial witnesses,” he added.

The $1.6 billion lawsuit brought by the New York attorney general’s office alleged that Exxon deceived investors about the true cost of climate change. The trial, which began in October and was the first climate fraud lawsuit to go to trial, was the result of a four-year investigation.

“Despite this decision, we will continue to fight to ensure companies are held responsible for actions that undermine and jeopardize the financial health and safety of Americans across our country, and we will continue to fight to end climate change,” Attorney General Letitia James said in a statement following the verdict.

The case focused on how Exxon, the United States’ largest oil company, accounted for the future potential cost of climate change. New York’s case accused the company of misrepresenting these costs, with James arguing that the company used one set of numbers publicly, while operating with a less conservative forecast internally.

When he took the stand on Oct. 30, former Exxon CEO Rex Tillerson said that the company tried to understand the impact of climate change and tried to accurately communicate this impact to shareholders. Exxon said the case was misleading and politically motivated and the result of a coordinated effort by anti-fossil fuel groups.

“Today’s ruling affirms the position ExxonMobil has held throughout the New York Attorney General’s baseless investigation,” Exxon spokesperson Casey Norton said in a statement. “We provided our investors with accurate information on the risks of climate change. The court agreed that the Attorney General failed to make a case, even with the extremely low threshold of the Martin Act in its favor,” he added, while noting that the company would continue to invest in technologies seeking to reduce emissions.

The case was dismissed “with prejudice,” which means that “this case cannot be tried again on these facts in New York,” Columbia University Law Professor John Coffee said. He added that it could go to New York State Appellate Court and a federal case would be “very unlikely” and “ill-fated.”

“Federal courts would have to respect this ruling under principles of res judicata, but it is conceivable that someone could allege violations of the federal securities laws and sue Exxon,” he said.

Then-New York Attorney General Eric Schneiderman announced his investigation of the company in 2015. At that point, the charge was broader, claiming that the company knew about the impact of carbon emissions on climate change for decades but covered it up.

In the years since, the case narrowed in scope. Ultimately, it was under New York’s Martin Act — a 1921 law meant to protect investors from false statements from corporations, even if the company wasn’t intentionally trying to be deceptive.

“This is a case about the disclosures ExxonMobil made about its use of a cost of carbon to hedge against the risk of more exacting regulations and what a reasonable investor would have understood those disclosures to mean,” the Oct.r 7 pretrial memo read. “By representing that it was applying higher projected carbon costs than it was actually using, ExxonMobil made its assets appear significantly more secure than they really were, which had a material impact on its share price. In so doing, ExxonMobil defrauded its investors under the Martin Act.”

In his 55-page ruling, Ostrager said his verdict pertained only to whether or not Exxon deceived investors.

“Nothing in this opinion is intended to absolve ExxonMobil from responsibility for contributing to climate change through the emission of greenhouse gases in the production of its fossil fuel products,” he wrote. “ExxonMobil is in the business of producing energy, and this is a securities fraud case, not a climate change case.”