WASHINGTON (AP) — New York Mayor Michael Bloomberg backed President Barack Obama over Republican Mitt Romney on Thursday, saying the incumbent Democrat will bring critically needed leadership to fight climate change after the East Coast devastation wrought by Hurricane Sandy.

The endorsement from the politically independent and nationally recognizable mayor was a major boost for Obama, who is spending the campaign's final days trying to win over independent voters whose voices will be critical in determining the winner of Tuesday's election.

Both candidates had eagerly sought the nod from Bloomberg, who didn't endorse a presidential candidate in 2008 and has publicly grumbled about both Obama and Romney. But Bloomberg said the possibility that Sandy resulted from climate change had made the stakes of the election that much clearer.

"We need leadership from the White House, and over the past four years, President Barack Obama has taken major steps to reduce our carbon consumption," Bloomberg wrote in an online opinion piece.

A full-throated stamp of approval this was not. Even as he pledged to cast his vote for Obama's re-election, Bloomberg faulted the president for discounting centrists, trading in divisive, partisan attacks and failing to make progress on issues like gun control, immigration and the federal deficit.

The billionaire businessman and former Republican also praised Romney as a good man who would bring valuable business experience to the White House but said Romney had reversed course on issues like health care and abortion. "If the 1994 or 2003 version of Mitt Romney were running for president, I may well have voted for him," he said.

Vice President Joe Biden, campaigning in Fort Dodge, Iowa, said the essence of Bloomberg's endorsement was that "we've got to work together."

"We got to stop this blue, red — I mean we're a purple nation, man," Biden said.

Bloomberg's endorsement could have the effect of injecting climate change and the environment into the national conversation just five days before the end of a campaign where both topics have been virtually absent.

Story continues

"Our climate is changing," Bloomberg said. "And while the increase in extreme weather we have experienced in New York City and around the world may or may not be the result of it, the risk that it might be — given this week's devastation — should compel all elected leaders to take immediate action."

To the dismay of environmental activists, climate change never came up during any of the three presidential debates and has been all but absent throughout the rest of the campaign. When Romney invoked the environment in his August speech accepting the Republican nomination, it was to mock his rival for making the issue a priority.

"President Obama promised to begin to slow the rise of the oceans and heal the planet," Romney said. "My promise is to help you and your family."

In his first term, Obama was unable to push limits on carbon emissions through a Democratic Congress and shelved plans to toughen smog standards. But he landed other historic achievements, including an increase in fuel-economy standards and the first regulations on heat-trapping gases blamed for global warming.

Romney, who has expressed doubts about the cause of climate change and charged Obama with punishing coal-fired power plants, wants clear air and water laws amended to balance environmental benefits with economic concerns.

Bloomberg, whose last presidential endorsement was for Republican President George W. Bush's re-election in 2004, has been a persistent advocate for policies intended to combat climate change and had previously faulted both Obama and Romney for failing to offer solutions for gun violence.

Romney advisers, asked about the endorsement, dismissed it as inconsequential and suggested it would have no bearing on the race outside of New York City.

Although Obama's campaign has long expected to win New York by a wide margin, independents like Bloomberg hold the key to his second term in battleground states across the country. Obama welcomed the endorsement, pledging in a statement to continue to stand with New York in its time of need.

"While we may not agree on every issue, Mayor Bloomberg and I agree on the most important issues of our time — that the key to a strong economy is investing in the skills and education of our people, that immigration reform is essential to an open and dynamic democracy and that climate change is a threat to our children's future, and we owe it to them to do something about it," Obama said.

___

Associated Press writers Steve Peoples in Richmond, Va., and Matthew Daly in Fort Dodge, Iowa, contributed to this report.

___

Reach Josh Lederman on Twitter at http://twitter.com/joshledermanAP