As a powerful hurricane slams Florida’s Gulf Coast, Florida Gov. Ron DeSantis is dealing with President Biden and the federal government in a very different calculus.

Mr. DeSantis, a Republican widely regarded as having White House ambitions, is widely regarded as one of his party’s most prominent political provocateurs, frequently appearing on national television to rail against an administration in Washington that he regards as overbearing. Mr. DeSantis dismissed Mr. Biden in February as someone who “hates Florida,” claiming baselessly that he “stiffs” storm victims of relief for political reasons.

But now, as Hurricane Ian threatens to wreak havoc across Florida, Mr. DeSantis must rely on the same federal government whose public health advice he mocked during the pandemic. Aside from that, he must collaborate with the president he has chastised and may soon run to replace.

Mr. DeSantis mentioned speaking with the president the day before during a briefing early Wednesday evening. “He said all hands-on deck, he wants to help,” Mr. DeSantis explained. “He said, ‘Ask us anything.'” He was inviting us to seek assistance.” Earlier, he praised the assistance provided by several federal agencies to Florida.

The pause in partisanship caused by the disaster is a significant shift for Mr. DeSantis, a politician who came to power during a highly polarized social media era and won his 2018 primary thanks to an endorsement from Donald J. Trump that he earned after defending Mr. Trump numerous times.

The governor’s tenure has been marked by a series of battles aimed at the Trump-aligned Republican base, particularly on social issues and pandemic response. One question that arose as the storm approached Florida was how long Mr. DeSantis, who is running for re-election in November against Democratic former governor Representative Charlie Crist, would put politics aside.

In contrast to Mr. DeSantis, Mr. Biden has long marketed himself as an across-the-board dealmaker.

On Wednesday morning, the president made it a point to say that he had spoken with Mr. DeSantis.

Mr. Biden, who met with several Florida mayors, said he told Mr. DeSantis that the federal government was “alert and in action” and that he had approved every request for federal assistance from Florida.

Hurricane Ian is Florida’s first major storm since Mr. DeSantis took office in early 2019. He is following in the footsteps of Florida governors, whose response to Hurricane Andrew in 1992 was widely criticized as too slow and ineffective.

When Jeb Bush, Florida’s two-term governor, ran for president in 2016, he frequently emphasized the state’s hurricane preparedness and rebuilding efforts under his leadership. Mr. DeSantis’s immediate predecessor, Rick Scott, cultivated an awkward public persona while navigating Florida through a series of hurricanes during his tenure.

Mr. DeSantis is unlikely to follow in the footsteps of New Jersey Gov. Chris Christie, whose warm greeting for President Barack Obama during a visit to inspect Hurricane Sandy damage in October 2012 drew scorn from fellow Republicans during his subsequent presidential campaign.

In an interview on Wednesday, Mr. Christie stated, “I wouldn’t change a thing.” “To me, the job that I was elected to do was always the most important thing, and politics at the time was secondary,” he continued.

Mr. DeSantis stated at the Conservative Political Action Conference in February that Mr. Biden “hates Florida” and “stiffs” storm victims for political reasons.

Mr. DeSantis has also spent months criticizing federal public health guidelines on the pandemic. He disparaged Dr. Anthony S. Fauci in August, just days after the doctor announced his retirement as director of the National Institute of Allergy and Infectious Diseases.

Mr. DeSantis also flew two planes filled with undocumented Venezuelan immigrants from Texas to Martha’s Vineyard, Mass., two weeks ago, in an effort to highlight his opposition to Mr. Biden’s immigration policy.