“This is a storm that will kill you if you don’t get out of the way,” National Hurricane Center meteorologist Dennis Feltgen said. “Everybody’s going to feel this one.”

Irma trained its sights on Florida and officials warned more than 5 million people that time was running out Friday and ordered them to evacuate ahead of the deadly hurricane as it followed a path that could take it from one end of the state to the other.

By early evening, Irma was a slightly weakened Category 4 storm with winds of 155 mph (250 kph) and forecasters said it could be back up to Category 5 when it comes ashore near Key West on Sunday morning.

Forecasters adjusted the storm’s potential track more toward the west coast of Florida, away from the Miami metropolitan area of 6 million people, meaning “a less costly, a less deadly storm,” University of Miami researcher Brian McNoldy said.

Nevertheless, forecasters warned that its hurricane-force winds were so wide they could reach from coast to coast, testing the nation’s third-largest state, which has undergone rapid development and more stringent hurricane-proof building codes in the last decade or so.

“This is a storm that will kill you if you don’t get out of the way,” National Hurricane Center meteorologist Dennis Feltgen said. “Everybody’s going to feel this one.”

Irma killed at least 20 people in the Caribbean and left thousands homeless as it devastated small resort islands known for their warm, turquoise water.

In Florida, gas shortages and gridlock plagued the evacuations, turning normally simple trips into tests of will. Parts of interstates 75 and 95 north were bumper-to-bumper, while very few cars drove in the southbound lanes.

“We’re getting out of this state,” said Manny Zuniga, who left his home in Miami at midnight Thursday to avoid the gridlock. “Irma is going to take all of Florida.”

Despite driving overnight, he still took 12 hours to reach Orlando a trip that normally takes four hours. From there, he and his wife, two children, two dogs and a ferret were headed to Arkansas.

In one of the country’s largest evacuations, about 5.6 million people in Florida more than one-quarter of the state’s population were ordered to evacuate and another 540,000 were told to leave the Georgia coast. Authorities opened hundreds of shelters for people who did not leave. Hotels as far away as Atlanta filled up with evacuees.

Florida Gov. Rick Scott said people fleeing could drive slowly in the shoulder lane on highways. He hasn’t reversed the southbound lanes because he said they were needed to deliver gas and supplies.

“If you are planning to leave and do not leave tonight, you will have to ride out this extremely dangerous storm at your own risk,” Mr. Scott said.

Tony Marcellus racked his brain to figure out a way to get his 67-year-old mother and 85-year-old grandfather out of their home five blocks from the ocean in West Palm Beach. He lives 600 miles away in Atlanta. He checked flights but found nothing and rental cars were sold out, so he settled on a modern method of evacuation.

“I have peace of mind now,” said Marcellus’ mother, Celine Jean. “I’ve been worried sick for days.”

Several small, poor communities around Lake Okeechobee in the south-central part of Florida were added to the evacuation list because the lake may overflow but the governor said engineers expect the protective dike to hold up. Many people in the area said they wouldn’t leave because they either had no transportation or nowhere to go.

Disney World parks will close early Saturday and remain shuttered through Monday, as will Universal Orlando and Sea World.

Miami-Dade County Mayor Carlos Gimenez said he planned for enough space to hold 100,000 people before the storm arrives, although most shelters were only beginning to fill on Friday.

Andrew razed Miami’s suburbs with winds topping 165 mph (265 kph), damaging or blowing apart over 125,000 homes. Almost all mobile homes in its path were obliterated. The damage totaled $26 billion in Florida’s most-populous areas. At least 40 people were killed in Florida.

CoreLogic, a consultant to insurers, estimated that almost 8.5 million Florida homes or commercial properties were at extreme, very high or high risk of wind damage from Irma.

Police in the Fort Lauderdale suburb of Davie said a 57-year-old man who had been hired to install hurricane shutters on Thursday morning died after falling about 15 feet (5 meters) from a ladder and hitting his head on a pool deck. The man’s name wasn’t immediately released.

Forecasters predicted a storm surge of 6 to 12 feet above ground level along Florida’s southwest coast and in the Keys. As much as a foot of rain could fall across the state, with isolated spots receiving 20 inches.

With winds that peaked at 185 mph (300 kph), Irma was once the most powerful hurricane ever recorded in the open Atlantic.