Flooding from days of record-setting rain along the heavily populated East Coast washed out bridges and homes and forecasters warned wind gusts topping 35 mph could down trees and power lines across the Carolinas and Virginia in coming hours.

South Carolina on Sunday struggled with flooding streets in the cities of Columbia and Charleston.

Television footage showed people needed to be rescued from deep water in Columbia, while in Charleston cars stranded and immersed in water almost up to the roof.

Vast swaths of U.S. Southeast and mid-Atlantic states were grappling with heavy rains and flooding from a weather system that is separate from Hurricane Joaquin, which is not expected to make landfall on the U.S. coastline.

Weather-related deaths

The East Coast flooding has already caused at least five deaths, washed out roads and prompted evacuations and flash flood warnings. President Barack Obama declared a state of emergency in South Carolina, making federal emergency funds available.

South Carolina emergency officials said inclement weather conditions were to blame for three traffic fatalities across the state on Friday and Saturday, as flash flood warnings were issued for numerous counties.

They said scores of homes had already been evacuated, including in the coastal county where the tourist destination Myrtle Beach is located.

Hurricane Joaquin swirled away from the Bahamas early Saturday, after slamming parts of the archipelago for more than two days. The storm was expected to pass west of Bermuda, well off the U.S. coastline, on Sunday, before heading on a north-northeast track taking it further out to sea.

Any slight eastward deviation in the forecast track could put Joaquin dangerously close to Bermuda, the NHC warned.

While Joaquin has continued to shift away from the U.S. East Coast, dangerous flooding triggered by heavy rainfall was expected across much of the Carolinas and parts of Georgia, Virginia and New Jersey this weekend, U.S. forecasters said.

Evacuations

It has been raining across much of the region all week, and the accumulated rainfall, coupled with more on the way from a weather system loosely connected with Joaquin, has prompted repeated flood warnings from the National Weather Service.

A statement from the North Carolina governor's office said up to 500 residents of Brunswick County had been evacuated from their homes Friday night into early Saturday morning due to flooding from heavy rains and a levee failure in South Carolina.

"We're not out of the woods yet," North Carolina emergency management director Mike Sprayberry said late Saturday.

The steady downpour drew its moisture from a slow-moving low-pressure system over the Southeast that has linked up to a finger of tropical moisture from Hurricane Joaquin. Heavy rain continued overnight in the Carolinas and parts of northern Georgia and could cause some significant river and stream flooding, the National Weather Service said.

The low-pressure system also was expected to whip up stiff northeasterly winds in the Blue Ridge mountains of the Carolinas and western Virginia with gusts up to 35 mph through Sunday, the weather service said. With tree roots already loosened in waterlogged soil, increased winds held the prospect of toppling trees onto power lines or property.

The Greenville-Spartanburg Airport in South Carolina recorded 2.3 inches of rain Saturday, smashing the previous record of 0.77 inches set in 1961, according to John Tomko, National Weather Service meteorologist at Greenville-Spartanburg.

"This one is extraordinary in that it's such a prolonged event," he said.

Scattered power outages

Flooded roads were closed throughout the mid-Atlantic region and power companies reported scattered outages in several states.

In New Jersey, storms dislodged an entire house from its pilings in a low-lying area of Middle Township in southern Jersey. No one was in the residence. Flood watches and warnings also are in effect in Delaware and parts of New Jersey, Maryland and Virginia.

Meanwhile, the Atlantic Seaboard was spared what could have been much worse damage had Joaquin not continued on a path well off the U.S. coast. And some people found ways to enjoy the wet weather, cavorting in kayaks and canoes in some flooded areas.