Score one for ordinary shareholders and people worried about climate change.

After years of resisting, ExxonMobil has agreed to reveal the risks it faces from climate change and the global crackdown on carbon emissions.

It's a major reversal for the world's biggest publicly traded oil company. Exxon (XOM) aggressively fought a shareholder proposal in May to disclose how the changing climate could hurt the company. The proposal wasn't binding, but 63% of shareholders supported it -- a rare rebuke that forced Exxon to rethink its stance.

Exxon said on Monday it has "reconsidered" the proposal following talks with major shareholders and supporters of the idea. Exxon said in an SEC filing that "in the near future" it will "further enhance" its disclosures on climate change.

Those enhancements, Exxon said, will include how the company is positioning for a lower-carbon future, how its business could be hurt by shifting energy demands and the "implications of two degree Celsius scenarios." The 2015 Paris climate accord requires countries to limit global average temperature rise to well below 2 degrees Celsius.

Limiting global warming could have massive implications for Exxon. For instance, Exxon's energy assets could lose value if the world's oil appetite shrinks because of emerging technologies like electric cars and regulations stemming from the Paris agreement.

Related: These companies are coming clean on climate change

Thomas DiNapoli, the New York state comptroller, who spearheaded the proposal, celebrated Exxon's reversal in a statement and called it a "win for shareholders."

"Exxon's decision demonstrates that investors have the power to hold corporations accountable and to compel them to address our very real climate-related concerns," said DiNapoli, who oversees nearly $200 billion in New York pensions held by teachers, police officers and other public workers.

In the past, Exxon had rejected the need for a so-called stress test of its climate risk because it already published an annual energy outlook that incorporates the impact of "increasingly stringent climate policies." Exxon has also pointed to efforts to limit greenhouse gas emissions through investments in new technology.

Exxon had also urged President Trump not to abandon the global climate agreement. The accord should boost demand for Exxon's vast natural gas business over dirtier fuels like coal.

To celebrate the two-year anniversary of the Paris accord, nearly 240 companies, including BlackRock (BLK) and JPMorgan Chase (JPM), have agreed to come clean on the risks from climate change.

Related: Harvard study: Exxon 'misled the public' on climate change

The Exxon shareholder vote was seen by climate activists as a major victory. In support of the shareholder proposal, Greenpeace launched a campaign in Dallas that featured billboards, bumper stickers and a blimp that said, "You pay the price for Exxon's greed."

Exxon has only come under more scrutiny since then. In August, Harvard University published a peer-reviewed study that found Exxon misled the public about the dangers of climate change for nearly 40 years. Exxon dismissed the study as "inaccurate and preposterous."

In September, the cities of San Francisco and Oakland filed lawsuits demanding Exxon and other oil companies pay billions to cover the costs of sea walls and other protections against rising sea levels caused by climate change.