NASSAU, Bahamas — This nation of idyllic beaches and island towns was bracing for a direct hit by Hurricane Dorian, with officials on Saturday ordering evacuations amid warnings that the powerful, slow-moving storm — nearing Category 5 intensity — could arrive as soon as the next morning and lash parts of the northern Bahamas for a devastating 48 hours or more.

A country of nearly 400,000 prepared for a strike that harbored echoes of Hurricane Irma’s wrath in 2017. Areas of the northern Bahamas could spend an extended period within Dorian’s eyewall, the National Hurricane Center said, subjecting them to extended bouts of punishing wind, rain totals above 24 inches and storm surge 10 to 15 feet above normal levels.

As Dorian’s peak winds climbed to 150 mph Saturday, Prime Minister Hubert Minnis ordered targeted evacuations. The direst warnings were reserved for the islands of Abaco and parts of Grand Bahama — home to Freeport, the nation’s second-largest city — which appeared to sit right in Dorian’s strike zone.

The evacuations — particularly from low-lying cays highly susceptible to storm surge — were voluntary. But government officials were encouraging residents to gather at nine hurricane shelters on Grand Bahama and 15 shelters on the Abaco and were predicting that 73,000 residents and 23,000 homes could be affected by the storm. Government authorities and local volunteers were aiding the evacuation of people by sea and land. Bahamasair was offering discounted rates to those seeking to leave the islands on flights before Dorian hits. Schools and government offices were ordered closed.

“Do not put your life and those of your loved ones at unnecessary risk,” Minnis said during a news conference. “I urge you, do not be foolish and try to brave out this hurricane. The price you may pay for not evacuating is your life or other serious physical harm.”

As the storm threatened to intensify to a Category 5, experts predicted it could weaken slightly before hitting the Bahamas, while remaining a highly dangerous Category 4. Concern centered on projections that the storm would pass with excruciating slowness, subjecting the beach resorts, marinas and mangrove flats on the northern islands to a prolonged threat from high winds and serious flooding.

“It can spend about two days between Abaco and Grand Bahama,” said Basil Dean, who serves as deputy director of the Bahamas Department of Meteorology. “We don’t see the storm moving completely out of the area until Tuesday afternoon.”

Capt. Stephen Russell, director of the Bahamas’ National Emergency Management Agency (NEMA), said disaster committees on Abaco and Grand Bahama are “doing their best” to encourage residents to move inland. He said NEMA officials were going door-to-door, “urging persons to leave the cays.”

“That’s the most we can do,” Russell said. “We can make the appeal, but we cannot physically manhandle persons and move persons from the island if they do not want to leave.”

The country’s department of meteorology has already issued a hurricane warning for portions of the northwestern Bahamas, including Abaco, Grand Bahama, Bimini, the Berry Islands, North Eleuthera and New Providence.

In Freeport, a city of 27,000 already facing stark economic challenges, residents were rushing to prepare. Scores of locals waited in long lines at packed supermarkets. Lines for gas extended into roadsides.

For many on the island of Grand Bahama, Dorian is a reminder of the bitter history of dangerous storms — particularly the back-to-back hurricanes Frances and Jeanne, which left a ruinous trail in 2004.

Victoria Ferguson, a 49-year-old interior decorator, said she felt “a little panicked” as Dorian approached.

“I’ve been through too many of these storms before,” Ferguson said. “My major concern is how quickly the island can get us back up and running with basic utilities.”

Dorian approaches as the Bahamas is still struggling to overcome the devastating effects of three recent hurricanes. In 2015, Hurricane Joaquin, a Category 4 storm, ravaged the southern islands, including Long Island. In 2016, Hurricane Matthew, an equally strong storm, tore through Grand Bahama, leaving 95 percent of the buildings in Eight Mile Rock and Holmes Rock — situated at the western part of the island — severely damaged.

In 2017, Hurricane Irma, a Category 5 storm, virtually leveled Ragged Island, leaving it inhabitable nearly two years after the storm.

Despite warnings, some residents in Dorian’s strike zone were still choosing to stay in their homes for the duration.

Hubert Pinder, a 74-year-old retired hairstylist, lives in one of the evacuation zones: Green Turtle Cay, Abaco.

His single-story house is less than 40 feet from the sea, but Pinder, who has Stage 4 stomach cancer, said, “I am going to stay right here.”

“My house is an old house, but it’s made of Abaco pine, so it’s a really strong place,” he said.

“The only problem I have is probably flooding because I’m on the water.

“There’s someplace I can go to stay with some friends, but right now, I’m going through cancer treatment, and I want to be on my own. I don’t feel well.”

Pinder said he has already battened down his windows and is ready to “ride out the hurricane.”

Christine Curry, a 54-year-old secretary who lives in Mount Hope, Abaco, said she was taking heed of the evacuation warnings.

She lives in North Abaco, where the eye of Dorian is expected to pass Sunday afternoon. Curry described her neighborhood as “low-lying and prone to flooding.”

“As a Christian, people don’t want to say that they are fearful, but the human side of you is fearful,” she said.

“While you’re trusting in God to keep you safe, there is still a fear.”

Faiola reported from Miami.