FREEPORT, Bahamas (AP) — Practically parking itself over the Bahamas for a day and a half, Hurricane Dorian pounded away at the islands Tuesday in a catastrophic onslaught that sent floodwaters up to the second floors of buildings, trapped people in attics and chased others from one shelter to another. At least five deaths were reported. This hurricane is the only Category 5 hurricane to ever hit the chain of islands known as the Bahamas.

“We are in the midst of a historic tragedy,” Prime Minister Hubert Minnis said. “The devastation is unprecedented and extensive.”

The storm’s relentless winds and rain battered homes and businesses on the islands of Abaco and Grand Bahama, which have a combined population of about 70,000 and are no more than 40 feet (12 meters) above sea level at their highest points. The Grand Bahama airport was under 6 feet (2 meters) of water.

Desperate callers trying to find loved ones left messages with local radio stations as the country’s health minister said medical teams would be sent to the Abaco islands by the afternoon.

As of daybreak, Dorian’s winds had dipped to 120 mph (193 kph), making it a still highly dangerous Category 3 hurricane, and the storm was barely moving at 1 mph (2 kph), with part of its eyewall hanging over Grand Bahama Island since Sunday night.

The storm was centered 40 miles (70 kilometers) northeast of Freeport and 110 miles (175 kilometers) northeast of West Palm Beach, Florida. Hurricane-force winds extended out as far as 45 miles (75 kilometers) in some directions.

Dorian was expected to approach the Florida coast later Tuesday, but the threat to the state eased significantly, with the National Hurricane Center’s projected track showing most of the coast just outside the cone of potential landfall. No place in Florida had more than an 8% chance of getting hit by hurricane-force winds.

As Labor Day weekend drew to a close, hundreds of thousands of people in Florida, Georgia and South Carolina — more than 800,000 in South Carolina alone, and a half-million in Georgia — were warned to evacuate for fear Dorian could bring life-threatening storm-surge flooding even if the hurricane’s center stayed offshore, as forecast. Several large airports announced closings, and hundreds of flights were canceled.

The U.S. Coast Guard airlifted at least 21 people injured on Abaco Island, which Dorian hit on Sunday with sustained winds of 185 mph (295 kph) and gusts up to 220 mph (355 kph), a strength matched only by the Labor Day hurricane of 1935, before storms were given names.

Scientists say climate change generally has been fueling more powerful and wetter storms, and the only recorded hurricane more powerful than Dorian was Allen in 1980, with 190 mph (305 kph) winds, though it did not hit land at that strength.

Bahamian officials said they received a “tremendous” number of calls from people in flooded homes. One radio station said it got more than 2,000 distress messages, including reports of a 5-month-old baby stranded on a roof and a woman with six grandchildren who cut a hole in a roof to escape rising floodwaters. At least two designated storm shelters flooded.

Dorian was blamed for one death in Puerto Rico at the start of its path through the Caribbean.

Minnis said many homes and buildings were severely damaged or destroyed. Choppy brown floodwaters reached roofs and the tops of palm trees.

Parliament member Iram Lewis said he feared waters would keep rising and stranded people would lose contact with officials as their cellphone batteries died.

“It is scary,” he said, adding that people were moving from one shelter to another as floodwaters kept surging. “We’re definitely in dire straits.”

Forecasters said that the storm had come to a near standstill because the steering currents in the atmosphere had collapsed, but that Dorian would resume moving later in the day, getting “dangerously close” to the Florida coast through Wednesday evening, very near the Georgia and South Carolina coasts Wednesday night and Thursday, and near or over the North Carolina shoreline late Thursday.

Meteorologist Daniel Brown cautioned that even “a small deviation” in its projected track could take the storm toward land.

In South Carolina, Interstate 26 was turned into a one-way evacuation route away from Charleston on the coast, and Georgia Gov. Brian Kemp likewise planned to reverse lanes on I-16 on Tuesday to speed the flow of traffic away from the danger zone.