FORT MYERS, Florida — President Joe Biden surveyed the devastation of hurricane-ravaged Florida on Wednesday, promising to marshal the power of the federal government to help rebuild as he comforted local residents alongside Republican Gov. Ron DeSantis, a potential 2024 foe.

Both men declared they were putting politics aside for now.

“Today we have one job and only one job, and that’s to make sure the people in Florida get everything they need to fully, thoroughly recover,” Biden said in this southwestern Florida community that bore the brunt of Ian’s assault.

“It’s going to take a hell of a long time, hopefully without any snags in the way,” he said. “Later, after the television cameras have moved on, we’re still going to be here with you.”

Earlier, DeSantis and his wife Casey greeted the president and first lady Jill Biden as they arrived at Fisherman’s Wharf, where homes and business lay in ruins amid debris and muck after Hurricane Ian tore through last week.

Biden and DeSantis spoke by themselves next to a boat the storm had lifted into a cafe, then moved separately among local residents hit hard by the hurricane. Biden embraced one woman.

The scope of the devastation was immense. Biden’s motorcade drove by wind-shorn trees, some uprooted, others with branches pulled backwards by the storm. Fields off the highway were still flooded, forming stagnant lagoons.

Signs for stores and restaurants were blown out; ruined mattresses were piled in neighborhood streets, a building was tipped to the side like a chess piece. An armada of workers and repair trucks struggled with recovery.

Hurricane Ian has resulted in at least 84 people confirmed dead, including 75 in Florida, and many people still wait for power to be restored. Ian’s 150 mph winds and punishing storm surge last week took out power for 2.6 million in Florida. Many people still are unable to get food and water.

At a briefing with local officials, Biden emphasized that the rebuilding effort will take months or years.

“The only thing I can assure you is that the federal government will be here until it’s finished,” Biden said.

With the midterm elections just a month away, the crisis was bringing together political rivals in common cause at least for a time.

DeSantis, as well as Sen. Rick Scott, have been among Biden’s most prominent Republican critics. Both, along with Republican Sen. Marco Rubio and other state and local officials, were accompanying the president on Wednesday.

Before the trip, White House press secretary Karine Jean-Pierre suggested it would be inappropriate for them to focus on political differences.

“There will be plenty of time, plenty of time, to discuss differences between the president and the governor — but now is not the time,” Jean-Pierre told reporters at a White House briefing. “When it comes to delivering and making sure that the people of Florida have what they need, especially after Hurricane Ian, we are one. We are working as one.”

Before the storm hit, the president had intended to visit the Florida cities of Orlando and Fort Lauderdale last week, where he planned to stress his efforts to strengthen Social Security and Medicaid. Biden has accused Scott of wanting to end both programs by proposing that federal laws should expire every five years, although the Florida senator has said he wants to preserve the programs.

Biden and DeSantis have had a multitude of differences in recent years over how to fight COVID-19, immigration policy and more. In recent weeks, they tussled over the governor’s decision to put migrants on planes or buses to Democratic strongholds, a practice that Biden has called “reckless.”

The hurricane changed the purpose and tone of Biden’s first trip to Florida this year, which was in an area devastated by winds and surging water . Boats, including huge yachts, were capsized and hurled inland.

FEMA Administrator Deanne Criswell told reporters on Air Force One that the cost of rebuilding will be huge: “It will certainly be in the billions and perhaps one of the more costly disasters that we’ve seen in many years.”

DeSantis made a point Wednesday of praising FEMA along with local and state agencies, saying coordination among them has been exceptional during Ian’s aftermath.

“There’s been less bureaucracy holding us back in this one than probably any one I’ve ever seen,” DeSantis said a briefing in Matlacha. He gave a 30-minute midday briefing on hurricane recovery efforts, including news that running water had been restored through much of the affected zone.

The White House message of bipartisan unity marks a difference from Biden’s predecessor, Donald Trump, who at times threatened to withhold aid to Democratic officials who criticized him, including Democratic Govs. Gavin Newsom of California and Andrew Cuomo of New York.

Trump threatened to withhold federal money from California after wildfires, saying its state officials were to blame for the deadly conflagrations, tweeting in 2018: “Billions of dollars are given each year, with so many lives lost, all because of gross mismanagement of the forests. Remedy now, or no more Fed payments!”

Politicians’ responses to natural disasters have the power to make or break political careers.

As Florida’s governor for eight years, Jeb Bush maintained a steady response to a parade of hurricanes and was rewarded with sky-high approval ratings. The response by President George W. Bush and Louisiana lawmakers to Hurricane Katrina in 2005 hangs over their legacies.

Former New Jersey Gov. Chris Christie, the Republican who welcomed President Barack Obama to his state to survey Hurricane Sandy damage just days before the 2012 general election, said that during natural disasters “the best political strategy is to have no political strategy, to do your job.”