Mr. Bloomberg, a political independent in his third term leading New York City, has been sharply critical of Mr. Obama, a Democrat, and Mitt Romney, the president’s Republican rival, saying that both men had 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 better candidate to tackle the global climate change that he believes might have contributed to the violent storm, which took the lives of at least 38 New Yorkers and caused billions of dollars in damage.

“The devastation that Hurricane Sandy brought to New York City and much of the Northeast — in lost lives, lost homes and lost business — brought the stakes of next Tuesday’s presidential election into sharp relief,” Mr. Bloomberg wrote in an editorial for Bloomberg View.

“Our climate is changing,” he wrote. “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 may be — given the devastation it is wreaking — should be enough to compel all elected leaders to take immediate action.”

Mr. Bloomberg’s endorsement is another indication that Hurricane Sandy has influenced the presidential campaign. The storm and the destruction it left in its wake have dominated news coverage, transfixing the nation and prompting the candidates to halt their campaigning briefly.

The announcement is also the latest in a series of steps Mr. Bloomberg has taken in a bid to assert his influence nationally as his final term as mayor enters its twilight — and after he appears to have abandoned his own hopes of one day becoming president.

Last month, the mayor said that he was creating his own “super PAC” to support candidates from either party, as well as independents, who he believes are devoted to his brand of nonideological problem solving, and he has increasingly used his personal wealth and the bully pulpit of his office in an effort to persuade elected officials to support same-sex marriage, gun control and education reform.

The impact of Mr. Bloomberg’s endorsement is unclear; his city and his state are overwhelmingly Democratic, and although he is a well-known and long-serving public official who frequently appears in the national media, his influence is difficult to measure: an ABC News/Washington Post poll conducted in December found 30 percent of Americans had a favorable view of Mr. Bloomberg, 26 percent had an unfavorable view, and many — 44 percent — had no opinion of him one way or the other.

Photo

Mayor Michael R. Bloomberg of New York introduced Barack Obama before a speech in 2008.Credit
Damon Winter/The New York Times

Both the Obama and Romney campaigns had aggressively sought the mayor’s endorsement, in large part because they believed he could influence independent voters around the country. Mr. Bloomberg had recently signaled he would not make an endorsement, telling reporters several weeks ago that he had decided whom he would vote for, but that he was not sure he would share that decision with the public.

John Weaver, a prominent Republican political strategist, said the timing of the mayor’s endorsement was notable.

“His announcement is sandwiched between this horrific calamity and the presidential election,” he noted. “So the timing could not have been more significant for him and his views.”

Steve McMahon, a veteran Democratic strategist, said he believed that now that Mr. Bloomberg had come to terms with not running for the presidency, he was interested in cementing his political legacy.

“Many politicians reach the point in their careers where they have built up considerable political equity and the only question is how they use it to make a difference,” he said. “In endorsing President Obama, the mayor seems to have decided to use some of his equity.”

Even before the hurricane struck, Mr. Bloomberg had been concerned about climate change. He is the chairman of an organization called C40, a network of cities seeking to reduce greenhouse-gas emissions.

An error has occurred. Please try again later.

You are already subscribed to this email.

Yet until the storm, climate change had not been much of an issue in the presidential campaign. The topic did not come up during the three presidential debates, and the candidates have not provided detailed legislative or regulatory plans outlining their stances on the issue.

Since the hurricane, a number of elected officials have come forward, chiefly in New York, to say that they have concluded the planet is undergoing climate change, that huge storms are no longer freak occurrences but expectable reality, and that public policy must begin to prepare for the impact.

Gov. Andrew M. Cuomo of New York said Tuesday, “Anyone who says there is not a dramatic change in weather patterns I think is denying reality.” Senator Charles E. Schumer, Democrat of New York, said Wednesday, “We’re going to pay a price for the change in climate.” And Representative Jerrold Nadler, Democrat of Manhattan, echoed the consensus of local officials on Thursday, saying simply, “There will be a storm of this magnitude again.”

Video

Bloomberg’s Endorsement; Recovery Update

TimesCast: Storm recovery efforts continued in New York City and beyond on Thursday, and Mayor Michael R. Bloomberg endorsed President Obama, citing climate change.

Mr. Bloomberg did not endorse a presidential candidate in 2008, when Mr. Obama ran against Senator John McCain, Republican of Arizona, and until Thursday, he had steadfastly withheld his support from both presidential candidates this year, largely because he had grown frustrated with the tone and substance of the presidential campaign. He recently derided as “gibberish” the answers that Mr. Obama and Mr. Romney gave during a debate to a question about an assault-weapons ban. He has expressed disappointment with Mr. Obama’s performance over the past few years and concern about what he has described as the shifts in Mr. Romney’s views over time.

Even in his endorsement, the mayor continued to express criticism of the president. He said Mr. Obama had fallen short of his 2008 campaign promise to be a problem solver and consensus builder, noting that Mr. Obama had “devoted little time” to creating a coalition of centrists in Washington who could find common ground on important issues like illegal guns, immigration, tax reform and deficit reduction.

“Rather than uniting the country around a message of shared sacrifice,” Mr. Bloomberg said of Mr. Obama, “he engaged in partisan attacks and has embraced a divisive populist agenda focused more on redistributing income than creating it.”

In making his endorsement, Mr. Bloomberg listed the various steps that Mr. Obama had taken over the last four years to confront the issue of climate change, including pushing regulations that seek to curtail emissions from cars and power plants. But the mayor cited other reasons for endorsing Mr. Obama, including the president’s support for abortion rights and for same-sex marriage, two high-priority issues for the mayor.

At the same time, Mr. Bloomberg said he might have endorsed Mr. Romney, a former Massachusetts governor, except for the fact that the Republican had abandoned positions that he once publicly held.

“In the past he has taken sensible positions on immigration, illegal guns, abortion rights and health care — but he has reversed course on all of them, and is even running against the very health care model he signed into law in Massachusetts,” the mayor said of Mr. Romney.

In a statement, Mr. Obama said he was “honored to have Mayor Bloomberg’s endorsement.” The president acknowledged Mr. Bloomberg’s chief concern, saying climate change was “a threat to our children’s future, and we owe it to them to do something about it.”

And alluding to the damage from the hurricane, Mr. Obama said: “He has my continued commitment that this country will stand by New York in its time of need. And New Yorkers have my word that we will recover, we will rebuild, and we will come back stronger.”

Coming on the heels of Gov. Chris Christie’s public embrace of Mr. Obama, the endorsement by Mr. Bloomberg left aides to Mr. Romney a bit flustered, and they privately dismissed its importance.

A version of this article appears in print on November 2, 2012, on Page A1 of the New York edition with the headline: Storm Propels Bloomberg Into Obama’s Corner. Order Reprints|Today's Paper|Subscribe