Not long ago, such a shift would have seemed out of the question in a state notorious for its tight election margins and nail-biting recounts. Mr. DeSantis won the governorship by about 32,000 votes in 2018, hardly a mandate. His aloof personality did not exactly sparkle.

But beginning in 2020, a politically attuned Mr. DeSantis seized on discontent with coronavirus pandemic policies, betting that economic prosperity and individual liberties would matter more to voters in the long run than protecting public health. More than 73,000 Floridians have died of Covid-19, yet public opinion polls have shown that Mr. DeSantis and many of his policies remain quite popular.

Parents, especially, who cheered the governor’s opposition to Covid-19 restrictions in schools, have remained active on issues of curriculum and culture.

“I think the governor is more popular than Disney — I think the governor is more popular than the former president,” said Anthony Pedicini, a Republican strategist in Tampa. “If you’re running for office as a Republican in Florida and you aren’t toeing the DeSantis mantra, you will not win.”

The question now for Mr. DeSantis — and virtually everyone else in Florida — is whether the rightward lurch will stop, either by court intervention, corporate backlash or, come November, electoral rebuke. But given Florida’s trends in recent years, the more likely outcome could be a sustained campaign toward a new, more rigid conservative orthodoxy, one that voters could very well ratify this fall.

The state’s swift and unexpected rightward tilt has happened as Florida has swelled with new residents. Between July 2020 and July 2021, about 260,000 more people arrived than left, a net migration higher than any other state. The trend began before the pandemic but appeared to accelerate as remote workers sought warm weather, low taxes and few public health restrictions.

Culturally, Floridians have been less conservative than their leaders. They have voted by large margins to legalize medical marijuana, prohibit gerrymandering and restore felons’ voting rights. (Last year, Republican lawmakers passed limits on the use of such citizen-led ballot initiatives.) So the recent rash of legislation has been met with trepidation in the state’s big cities, which are almost all run by Democrats.