The New York Attorney General's office sued ExxonMobil on Wednesday, accusing the fossil fuel giant of defrauding investors by misleading them about the financial risks the company faced from climate change regulations.

The lawsuit caps a contentious and often politically charged three-year investigation into Exxon and sets the stage for what could be years of litigation involving a company that fights furiously to protect its business.

Exxon engaged in "a longstanding fraudulent scheme" to deceive investors by providing false and misleading assurances that it was effectively managing the economic risks posed by increasingly stringent policies and regulations it anticipated being adopted to address climate change, the lawsuit states.

"Instead of managing those risks in the manner it represented to investors, Exxon employed internal practices that were inconsistent with its representations, were undisclosed to investors, and exposed the company to greater risk from climate change regulation than investors were led to believe," the lawsuit said.

Sign up for InsideClimate News Weekly Our stories. Your inbox. Every weekend.

The attorney general's office said the alleged fraud reached the highest levels of Exxon, including former Chairman and CEO (and later U.S. Secretary of State) Rex Tillerson, who it said had known about the misrepresentations for years.

Exxon has 30 days to respond to the complaint filed in New York State Supreme Court. The company told NBC News in a statement that it "looks forward to refuting these claims as soon as possible and getting this meritless civil lawsuit dismissed."

AG: 'Exxon Built a Facade to Deceive Investors'

"Investors put their money and their trust in Exxon—which assured them of the long-term value of their shares, as the company claimed to be factoring the risk of increasing climate change regulation into its business decisions. Yet as our investigation found, Exxon often did no such thing," Attorney General Barbara Underwood said in a prepared statement.

"Instead, Exxon built a facade to deceive investors into believing that the company was managing the risks of climate change regulation to its business when, in fact, it was intentionally and systematically underestimating or ignoring them, contrary to its public representations," she said.

Underwood became attorney general after Eric Schneiderman resigned earlier this year. Voters will choose her replacement in the November election.

The heart of the lawsuit rests on a ponderous examination of Exxon's financial records, which show how the company used proxy costs to calculate the financial impact on its business from future rules designed to combat climate change.

Exxon for years had assured investors that it was accounting for the likelihood of increasingly stringent regulation of greenhouse gas emissions, the driver of climate change, by rigorously and consistently applying an escalating cost of those emissions to its business planning, according to the lawsuit.

But the company did much less than it claimed and deceived investors about to the company's true financial exposure to increasing climate regulations, the lawsuit said.

"Exxon's proxy cost representations were materially false and misleading because it did not apply the proxy cost it represented to investors," the lawsuit said. "This was especially true of investments with high GHG (greenhouse gas) emissions, where applying the publicly represented proxy cost would have had a particularly significant negative impact on the company's economic and financial projections and assessments."

Exxon Tried to Block the State Investigations

The New York investigation began three years ago, when then-Attorney General Schneiderman hit Exxon with a subpoena seeking documents spanning four decades of research findings and communications about climate change. Massachusetts investigators followed several months later with a separate subpoena.

The two investigations were announced following the publication of an investigative series of stories by InsideClimate News and later the Los Angeles Times that disclosed that Exxon had long understood the consequences of global warming but engaged in a campaign to cast doubt on the scientific conclusions.

Exxon immediately went on the offensive and has been fighting in courtrooms since then to block the state investigations. Exxon argued that the state attorneys general were trying to muzzle the company and were violating the First Amendment right to free speech. The company said the attorneys general were attempting to silence those who disagreed with their views, specifically the causes, impacts, remedies and severity of climate change.

The case ended up in New York federal court, where a judge earlier this year rejected Exxon's plea to block the duel investigations, saying the company was relying on "extremely thin allegations and speculative inferences." Exxon had appealed that ruling.