New York state announced Wednesday that it is suing oil Exxon Mobil, alleging the oil and gas giant committed securities fraud by misleading investors about the danger climate change poses for its business.

New York had been investigating Exxon for more than three years before filing the lawsuit in New York's Supreme Court, suggesting the state believes it has strong evidence to succeed in court.

Exxon has tried to block the investigation, and related ones in other states. A federal judge rejected Exxon’s attempt to shut down New York’s probe earlier this year, a decision the company has appealed.

“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,” New York Attorney General Barbara Underwood, a Democrat, said in a statement Wednesday. “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.”

Under U.S. law, public companies must tell shareholders about risks or uncertainties related to their business. In Exxon's case, its oil and gas operations emit greenhouse gas emissions, and thus contribute to climate change.

New York alleged the highest levels of Exxon management were complicit in the alleged fraud, and knew about it, specifically calling out former Chairman and CEO Rex Tillerson, who was briefly President Trump's secretary of state.

The suit says Exxon for years assured investors it was considering the potential future costs to its business of governments enacting regulations limiting greenhouse gas emissions, and how that would impact future demand for oil and gas.

However, New York alleges that Exxon in reality underrepresented these future costs, sometimes not accounting for costs from climate change at all, deceiving investors of their true financial exposure.

Downplaying the costs caused harm to shareholders, the complaint says, including the New York State Common Retirement Fund and New York State Teachers Retirement System.

The suit seeks to stop Exxon from continuing to misrepresent how its business impacts climate change. It also asks the court to award monetary damages and restitution related to the alleged fraud.

Exxon later Wednesday issued a scathing statement rejecting the merits of the lawsuit, saying it aims to have it dismissed in court.

"These baseless allegations are a product of closed-door lobbying by special interests, political opportunism and the attorney general’s inability to admit that a three-year investigation has uncovered no wrongdoing," said Scott Silvestri, an Exxon spokesman.

Exxon and other oil and gas companies are also being sued by various cities for their handling of climate change, but have been successful so far in fending those off.

A federal judge this summer dismissed New York City's lawsuit against major oil companies for their contribution to climate change, the latest in a string of suits filed by cities to be tossed aside. In addition, the Securities and Exchange Commission in August decided to close a two-year investigation of Exxon Mobil over whether the oil and gas giant misled investors by downplaying the impact of its business on climate change.

Cities, including San Francisco and Oakland, have argued that big oil companies have promoted fossil fuel use and deliberately concealed that they knew climate change could harm coastal cities, meaning they should have to pay for seawalls and other infrastructure to protect against rising sea levels.

Oil companies say that courts cannot rule on broad and speculative issues such as the impact of business decisions on climate change.

But oil companies such as Exxon in recent years, facing public pressure, have sought to show support for policies to reduce greenhouse gas emissions.

Exxon this month said it would provide $1 million over two years to Americans for Carbon Dividends, an advocacy organization set up to lobby Congress to support a federal carbon tax plan proposed by the Climate Leadership Council, a group led by two former Republican secretaries of state, James Baker III and George Shultz.

That plan would give immunity to oil companies from certain types of lawsuits related to climate change. However, lawsuits like New York's dealing with fraud are not included.