By Harriet McLeod

CHARLESTON, S.C. (Reuters) - Powerful Hurricane Joaquin headed toward Bermuda on Saturday after hammering the Bahamas and leaving a cargo ship with 33 mostly American crew members missing in its wake.

Meanwhile, vast swaths of U.S. Southeast and mid-Atlantic states were grappling with heavy rains and flooding from a separate weather system which has already caused at least two 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.

At 5 p.m. EDT (2100 GMT), Joaquin, which strengthened significantly early Saturday, had maximum sustained winds of 150 miles (240 km) per hour, the U.S. National Hurricane Center said.

The storm, a potentially catastrophic Category 4 on a scale of 1 to 5, was about 500 miles (805 km) southwest of Bermuda, the Miami-based NHC said.

It 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, however, the NHC warned.

The U.S. Coast Guard said there was still no trace on Saturday of El Faro, a 735-foot (224-m) cargo ship that went missing off Crooked Island in the Bahamas on Thursday morning after it was overcome by heavy weather from Joaquin.

The vessel, with 28 U.S. citizens and five Polish nationals aboard, was headed to San Juan, Puerto Rico, from Jacksonville, Florida when it reported losing propulsion and that it was listing and taking on water, the Coast Guard said.

There had been no further communications after a distress call received at about 7:30 am (1130 GMT) Thursday, the Coast Guard said. Search and rescue efforts continued Saturday, after covering 850 square nautical miles on Friday, but turned up no sign of the U.S.-flagged ship.

Story continues

"We are very surprised that we lost all communication with the ship," Mike Hanson, a spokesman for El Faro's owner, Tote Maritime Puerto Rico, told Reuters on Saturday.

"The ship was simply in the wrong place at the wrong time," he added, saying Joaquin was just a tropical storm when El Faro set out from Jacksonville but later intensified rapidly into a major hurricane.

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.

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.

South Carolina emergency officials said flash flood warnings were issued for numerous counties on Saturday. They said scores of homes had already been evacuated, including in the coastal county that includes Myrtle Beach.

More than 15 inches (38 cm) of rain has fallen over the popular beach area since Friday, with more expected, the National Weather Service in Wilmington, North Carolina, reported.

"These kind of prolific rainfalls are not unprecedented, but this is definitely one for the history books," said NWS forecaster Dave Loewenthal in Wilmington.

"We have had numerous reports of road closures. We have had roads washed out, sinkholes forming," he said. "It's really a mess and we are going to have significantly more problems with multiple rivers reaching moderate flood (level) or higher."

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.

"It's definitely a life-threatening situation," said NWS meteorologist Steve Pfaff.

"There were people that were stuck in vehicles that were flooded and water in some of the homes was up over the electrical outlets," he said.

North Carolina Governor Pat McCrory said the effect of the heavy rains on agriculture was a major concern. "North Carolina farmers have been harvesting crops at a feverish pace to minimize economic loss," the statement from his office said.

No deaths or serious injuries were reported in the Bahamas due to Joaquin, which destroyed houses, uprooted trees and unleashed heavy flooding on several smaller islands, but two deaths in the Carolinas on Thursday were linked to rain there.

It was not clear whether the deaths of four people in a small plane crash Friday near Lake Hartwell, South Carolina, was weather related.

Before an earlier shift in Joaquin's trajectory, New York and New Jersey, where Superstorm Sandy killed more than 120 people and caused $70 billion of property damage in October 2012, faced potential threats from the storm.

(Additional reporting by Gene Cherry on Hatteras Island, N.C. and Laila Kearney in New York; Writing by Tom Brown; Editing by James Dalgleish)