(NYT) In a surprise announcement, Mayor Michael R. Bloomberg said Thursday that Hurricane Sandy had reshaped his thinking about the presidential campaign, and he announced that he was endorsing President Obama.

Mr. Bloomberg, a political independent in this third term leading New York City, has been sharply critical of both Mr. Obama, a Democrat, and Mitt Romney, the president’s Republican rival, saying that both men have failed to candidly confront the problems afflicting the nation. But he said he had decided over the past several days that Mr. Obama was the best candidate to tackle the global climate change that the mayor believes contributed to the violent storm, which took the lives of at least 38 New Yorkers and caused billions of dollars in damage.