Hurricane Dorian beat a steady path north on Wednesday as residents of coastal South Carolina braced for the region's worst flooding in 30 years after at least 20 people were killed in the Bahamas, authorities and forecasters said.

Dorian was on the move along the U.S. coastline early, lashing the east coast of central Florida and eyeing the Carolinas, where mass evacuations have already been ordered.

South Carolina appeared to be in line for some of Dorian's worst.

High tides are expected to top 9½ feet on Wednesday afternoon and then 10½ feet early Thursday along Charleston Harbor, the National Weather Service said. Flooding occurs when tides reach 7 feet.

Download the NBC News app for news alerts about Hurricane Dorian

If Thursday's water levels come in at 10½ feet, it would second in Charleston County history only to a 12.52-foot tide that struck Sullivan Island in the midst of Hurricane Hugo on Sept. 22, 1989.

Since Monday afternoon, a 100-mile stretch of Interstate 26, from coastal Charleston to inland Columbia, has been running one way, west. Lane reversals were being returned to normal on Wednesday, the state Public Safety Department said.

Charleston Mayor John Tecklenburg said he wanted his city to be empty and shuttered.

"Starting late this afternoon, for 36 hours, I want Charleston to be a ghost town," he told reporters on Wednesday at a Charleston concert hall. "I want everybody out of sight ... inside, hunkered down and safe."

Despite the potential damage coming to South Carolina, President Donald Trump said much of the Southeast would be spared.

"It was going to hit not only Florida, but Georgia. ... It was going toward the Gulf, that was what was originally projected, and it took a right turn and, ultimately, hopefully, we're going to be lucky," Trump said. "Florida was grazed — mostly wind."

Trump also said the Coast Guard was headed for the Bahamas to provide humanitarian relief to people harmed by slow-moving Dorian, which devastated the islands and killed at least 20 people.

Bahamas Health Minister Duane Sands told NBC News on Wednesday that 20 deaths had been confirmed so far and that the number was expected to rise.

"We've had an absolute horrendous tragedy, numbers of lives lost, and we have not completed the door-to-door," Sands said.

Rain bands from the storm were drenching the northeastern coast of Florida at 5 a.m. Wednesday, the National Hurricane Center said. The storm was expected to come "dangerously close" to Florida's east coast and the Georgia coast through Wednesday night, and forecasters with the National Hurricane Center said it would move near or over the South and North Carolina coasts Thursday through Friday morning.

President Donald Trump speaks with reporters about Hurricane Dorian in the Oval Office on Sept. 4, 2019. Evan Vucci / AP

Although the storm had weakened to a Category 2 hurricane with maximum sustained winds of 105 mph — it was a Category 5 when it made landfall in the Bahamas on Sunday — officials have warned people to take precautions and to heed evacuation orders, as Dorian has the potential to produce storm surges of several feet.

Federal emergency declarations have been approved for four states — Florida, Georgia, South Carolina and North Carolina — and the governor of Virginia has also declared a state of emergency.

The hurricane was expected to remain at about the same intensity for the next couple of days, and even if it doesn't make landfall, hurricane-force winds are expected to reach parts of the coast from central Florida to North Carolina, the hurricane center said.

The Latest on Dorian:

The hurricane was about 150 miles south of Charleston, South Carolina, late Wednesday afternoon and was moving north-northwest at 8 mph.

The storm had maximum sustained winds of about 110 mph.

At least 20 people have died in the Bahamas, and more deaths are expected to be reported, the prime minister said.

Officials said Dorian was set to move near or over the South Carolina coast on Thursday and then near or over the North Carolina coast on Thursday night and Friday.

The forecast track continues to take the hurricane "dangerously close to the southeast U.S. coast," the hurricane center said late Wednesday afternoon.

"All interests from northeast Florida to the Carolinas should remain vigilant to the possibility of experiencing destructive winds, flooding rains, and life-threatening storm surges from this hurricane," the center said.

Video from Florida showed winds and rain hitting parts of St. Augustine Beach, the coast southeast of Jacksonville, Cocoa Beach and other areas Tuesday night and Wednesday morning.

Volusia County emergency management officials tweeted Wednesday that all bridges were closed to eastbound traffic. The sheriff's office said it was prepared with high-water rescue teams if needed.

DORIAN UPDATE: In St. Augustine Beach, the wind is coming down heavily by the pier. Thankfully, the wind is not this strong on the roadways. As you can see by the end, rain is coming down in strong spurts, and then stopping. Curfew is still in effect. Shelters are open. .@FCN2go pic.twitter.com/9yo2C8eDzX — Lana Harris (@LanaHarrisNews) September 4, 2019

Hurricane warnings were in place from the Savannah River on the Georgia-South Carolina border to Surf City, North Carolina, including Pamlico and Albemarle sounds, the hurricane center said. The hurricane center said storm surges of 5 to 8 feet could be seen in some parts of the Carolinas, along with 3 to 5 feet in parts of Florida and Georgia.

Blowing rain right now at Waterfront Park along the Intracoastal in #PalmCoast. We’ll be live on @WESH in minutes. #HurricaneDorian pic.twitter.com/IABqAiLy1F — Alex Villarreal (@AlexvWESH) September 4, 2019

North Carolina Gov. Roy Cooper urged people to take evacuation orders seriously. He activated 300 National Guard members and issued evacuation orders for all barrier islands beginning Wednesday.

"We have seen the life-and-death effects of this storm in the Bahamas, and we urge everyone on the islands at the coast to leave," he said in a statement.

The governors of South Carolina and Georgia have also ordered at least 1 million people to evacuate.

While there have been no recorded deaths as a result of storm conditions in the United States, at least two people have died while making preparations in the last few days.

A 55-year-old man died Monday after falling about 15 feet from a tree in Ocoee, Florida, the fire brigade said. The man, who wasn't named, was pronounced dead at a hospital.

"He was in a tree cutting limbs in preparation, and then a limb broke lose," said Corey Bowles of the Ocoee Fire Department. "He was preparing for the storm."

On Sunday, David Alan Bradley, 68, of Indialantic, Florida, died after falling from a ladder on his third-story balcony, police said. He was putting plywood on his windows, Police Chief Michael Connor said in an email early Wednesday.

Separately, a 61-year-old man died while swimming in the Atlantic Ocean near Hatteras Village, North Carolina, on Sunday, the National Park Service said.

The park service said that the cause of death was unknown but that a high risk of rip currents had been forecast for most of the beaches along Hatteras National Seashore on Sunday. It was unclear whether the man was caught up in a rip current.

Some 823 flights within, into and out of the U.S. were so far cancelled early Wednesday and Daytona Beach, Orlando and Palm Beach international airports are among those that remain closed due to weather conditions, according to FlightAware, an aviation data company.

As the U.S. braces for Dorian, the Bahamas has begun to assess the scope of the disaster there. For hours, Dorian parked over Abaco and Grand Bahama Islands, pounding them with winds up to 185 mph and torrential rain before finally moving into open waters Tuesday on a course toward Florida.

"It’s total devastation. It’s decimated. Apocalyptic," Lia Head-Rigby, who helps run a local hurricane relief group and flew over the Bahamas’ hard-hit Abaco Islands, told the Associated Press. "It’s not rebuilding something that was there; we have to start again."

Seven deaths have been reported, but leaders say more are likely. Head-Rigby said her representative on Abaco told her there were "a lot more dead," though she had no numbers as bodies being gathered.

The Bahamas’ prime minister also expected more deaths and predicted that rebuilding would require "a massive, coordinated effort."

"We are in the midst of one of the greatest national crises in our country’s history," Prime Minister Hubert Minnis said at a news conference. "No effort or resources will be held back."

Cruiseline Royal Caribbean International announced Monday that it would commit $1 million to disaster relief efforts to help rebuild the island nation.