NEW YORK — The government has dropped a two-year investigation into how Exxon Mobil Corp. factors climate-change regulations into its calculations of the value of its assets, the company said Friday.

The Securities and Exchange Commission informed the energy giant in a letter dated Thursday that it would not recommend an enforcement action against the company at this time.

Exxon Mobil cooperated with the inquiry, producing more than 4.2 million pages of documents, company spokesman Scott Silvestri said.

“After a thorough investigation, including a review of these documents, the SEC issued its closure letter,” he said.

Silvestri added that Exxon Mobil is confident its financial reporting meets all legal and accounting requirements.

The SEC letter included standard language stating that the decision should not be construed as an exoneration and leaving open the possibility of further future action. The SEC declined to comment.

Exxon faces separate investigations in New York and Massachusetts into whether it misled investors and the public about its knowledge of climate change and how the issue could affect its business.

In March, a federal judge dismissed a lawsuit by Exxon Mobil aimed at the stopping the investigations, dismissing as “implausible” the company’s allegations that the states were acting in bad faith.

“Our investigation remains ongoing,” said Amy Spitalnick, a spokeswoman for New York Attorney General Barbara Underwood. “We’re gratified that multiple courts have now rejected Exxon’s arguments regarding our investigation – fully dismissing Exxon’s lawsuit against our office, and ordering Exxon and its accounting firm to produce the documents we subpoenaed.”

The Irving, Texas-based oil company has called the two state investigations politically motivated.

“As we have said all along, the SEC is the appropriate entity to examine issues related to impairment, reserves and other communications important to investors,” Silvestri said.

The SEC investigation began under the Obama administration. Its decision to drop the case came on the same day that the Trump administration proposed rolling back car-mileage standards, a move that would weaken one of the federal government’s chief weapons against climate change.