If you’ve read the The New York Times recently, you may have heard that New York State Comptroller Thomas DiNapoli became a hero for deciding to disinvest the New York Common Retirement Fund from fossil fuel stocks. If you read the pages of the New York Post, on the other hand, DiNapoli finally caved to climate change cronies. The truth of the matter is a little more complicated.

DiNapoli’s decision to divest from fossil fuel companies in favor of low-carbon firms could be seen as a form of pension fund activism, in which pension boards use their investment in an effort to bring about significant change. In this case, it would be to reduce the effects of global warming by putting money into alternative energy. New York City, San Francisco, and Washington D.C. have implemented similar measures, as have the United Kingdom, Ireland, and Sweden.

Environmental activists had urged DiNapoli to sell the state’s holding in companies that contribute to global warming for years, but the comptroller resisted because he said his primary obligation was to maximize returns in a long-term perspective. That same philosophy, he said, influenced his decision to finally invest in low-carbon companies, which have now shown the ability to provide investment returns for the fund. Oil and gas companies, however, are beginning to look like poor long-term investments to many investors.

“New York State’s pension fund is at the leading edge of investors addressing climate risk, because investing for the low-carbon future is essential to protect the fund’s long-term value,” he said in a statement, according to The Times.

DiNapoli was wise to hold off in past years on making this kind of decision on pension fossil fuel divestment based purely on political pressure. Socially-driven financial decisions have hurt some pension funds and arguably that has violated the fiduciary duty to generate long-term returns for public employee assets. For example, The California Public Employees’ Retirement System (CalPERS) determined it had missed out on some $3 billion in returns after divesting from tobacco stocks in the early 2000s.

That fiduciary duty is not to be taken lightly. Public pension fund managers are tasked with generating maximum returns as part of a long-term investment strategy that is synced up with the long-term nature of paying out pension benefits. Such strategies may involve taking less risk and less return in order to ensure all necessary funds are available to keep benefit promises.

Still, some public employee groups have complained about the decision on the grounds that it is purely political, as the Post has suggested. This is an understandable position, but divesting from fossil fuel companies right now isn’t entirely inconsistent with a profit maximization directive.

It’s entirely possible that politics has shaped DiNapoli’s perspective on fossil fuel stocks. But his recent decision is one that can be squared with his fiduciary duty to New York State’s retirees. It’s reasonable that an investment strategy shifting away from fossil fuel companies is better for the long-term nature of the fund, both related to the profitability prospects for those companies and the implications of climate change on the global economy.