WEST PALM BEACH, Fla. — As the outer bands of Hurricane Dorian began brushing the Florida coast on Tuesday, a woman raced to pick up her mother-in-law at a retirement community, where the elevator was about to be shut down. The staff of a nursing home packed up more than 200 residents as well as the supplies they might need: cases of water, air mattresses and board games. At another center, residents were evacuated in specialty ambulances, rented motor coaches and private vehicles.

Across the state, a scramble was underway to move older Floridians to safer ground as a weakened but still dangerous Hurricane Dorian, once a Category 5 storm but now a vast Category 2, threatened the state’s Atlantic coast.

[Follow live updates on Hurricane Dorian here.]

The last major Atlantic storm to hit the state was foremost in officials’ minds. When Hurricane Irma came ashore two years ago, a dozen patients died after a nursing home in Hollywood, Fla., lost its air-conditioning. The tragedy prompted new regulations and an acknowledgment that evacuation orders were not enough to protect the state’s large older population. When it comes to older people, no state has more retirees than Florida, where they make up one-fifth of the population, according to the AARP.

A new state law requires backup generators and enough fuel to maintain comfortable temperatures at nursing homes and assisted living centers, a mandate first tested last year when Hurricane Michael struck the Florida Panhandle. Last week, four nursing home workers were charged in the Hurricane Irma deaths, which were ruled homicides.