Sept 23 (Reuters) - Nearly all rivers and waterways in North and South Carolina will crest Sunday, but most will remain at dangerous flood levels for days to come, the U.S. National Weather Service warned, more than a week after the arrival of Hurricane Florence, which has killed at least 40 people.

Swaths of rivers near the Atlantic coast will not crest for days to come, such as the lower Cape Fear River near Wilmington, N.C., one of the hardest hit communities, said Bob Oravec, a meteorologist with the NWS's Weather Prediction Center in College Park Maryland.

"This isn't over," Oravec said early Sunday. "Large sections of rivers near the coast won't start cresting until at least early in the week, maybe later."

"All that water is going to take a good while to recede," he said. "Damage can still be done. It'll be a slow drop."

Meanwhile, remnants of the once mighty storm, brought heavy rains northwest up the Ohio Valley, prompting flood watches and warnings from Texas to Virginia and Maryland, at least through Monday, the weather service said.

Officials in towns and cities in both North and South Carolina were filling sandbags and finalizing evacuation plans, eyeing some rivers that are swollen by heavy rainfall on Saturday.

In Conway, South Carolina, where President Donald Trump visited this week, images posted by the city on Saturday showed water lapping at homes in an area where residents were being evacuated.

In Lee's Landing in Horry County, some residents used boats to get to safety as the Waccamaw River spilled into neighborhoods, a local CBS affiliate reported.

"If you can get out, get out," Joseph Tanner, the county's fire rescue chief, said in an interview with WBTW News 13.

More than two dozen flood gauges in North and South Carolina showed flooding on Saturday, the NWS said.

At least 40 deaths have been attributed to the storm, with most of those in North Carolina.

About 5,000 people across North Carolina have been rescued by boat or helicopter since the storm made landfall, twice as many as in Hurricane Matthew two years ago, according to state officials. Thousands of people remained in shelters.

Nearly 550 roads remained closed, the state's department of transportation said, warning motorists not to travel in 17 southeastern counties worst-hit by Florence.

Duke Energy Corp said on Friday that breaches in a cooling lake dam forced it to shut down its natural gas-fired L.V. Sutton plant in North Carolina. The utility said it could not rule out the possibility that coal ash from a dump adjacent to the plant, which formerly burned coal, might be flowing into the nearby Cape Fear River.

Coal ash can contaminate water and harm fish and wildlife.

The company is testing the water for possible contamination, Duke officials said in a release Saturday.

"The company is bringing in additional construction material from across the state to repair the breach as soon as the flood waters recede," the release said.

The flooding from Florence has also caused 21 hog "lagoons," which store manure from pig farms, to overflow in North Carolina, possibly contaminating standing water, according to state officials. North Carolina is one of the leading hog-producing states in the country.

Several sewer systems in the region also have released untreated or partly treated sewage and storm water into waterways over the last week, local media reported.