– It will not be easy drying out, fixing up and rethinking whole ways of life in a region drenched and deeply shaken by more than 8 trillion gallons of rain.

But that is the challenge facing the Carolinas after Hurricane Florence and a wearying week of heroic rescues, hard choices, potential environmental crises — including a dam breach Friday that allowed coal ash to seep into a river — and a vast response that is still unfolding.

The storm and its subsequent flooding have killed at least 42 people. The threats have not abated, particularly here in South Carolina’s low-lying coastal plain, where the Waccamaw River set a record Friday and will keep rising into the new week, threatening neighborhoods, infrastructure and lives anew.

Already, the emergency and recovery response is staggering in its scope, with more than 6,000 National Guard soldiers and thousands more federal disaster-response workers. They have 6 million emergency meals to hand out, 4 million liters of water, 700,000 blankets and 6,000 cots. Along with state and local governments, federal officials will also have to manage a daunting bureaucratic challenge as they attempt to rebuild and revive a vast area that covers hard-hit mega-farms, tourist zones and pockets of deep rural poverty.

It is too early to judge fully the effectiveness of a response that is only beginning. Checks must still be distributed to victims, emergency loans granted to businesses, and homes rebuilt — or bought out. There are mounting concerns about environmental consequences, like spills of coal ash and hog waste, that will test regulators. But so far, unlike the aftermaths of Hurricane Katrina, which struck the Gulf Coast in 2005, or Hurricane Maria, which pummeled Puerto Rico last year, there have been no charges of large-scale government incompetence. The displaced, thousands of them, landed, safe if not particularly comfortable, in scores of shelters, and the evacuation of the coastline was a generally orderly affair. In South Carolina, in what is now a well-practiced routine, officials reversed the flow of traffic on some major roads, creating more ways to flee the Atlantic.

State government officials believe technology helped: Traffic to a North Carolina website that allows residents to sign up for text-message alerts when the water is rising in their neighborhoods increased more than eightfold from the traffic during Hurricane Matthew, in 2016. A South Carolina mobile app let users know whether they were in an evacuation zone, and where to find open shelters.

Local governments took the threat seriously, relying on their experience from Matthew to identify neighborhoods most likely to flood. In Kinston, N.C., officials ordered dozens of signs and posted them on the most vulnerable streets: “THIS AREA PRONE TO FLOODING BE CAUTIOUS.”

The long-term recovery work, however, has just begun, and it is certain to test the competence, and burnish or break the reputations, of a roster of high-profile players.

The Federal Emergency Management Agency is seeking to show its mettle after the debacle in Puerto Rico. Although President Donald Trump has celebrated the effort as a success, the agency itself acknowledged that it had inadequate supplies and had underestimated what it would need.

In the spotlight is Brock Long, Trump’s FEMA chief, who received accolades for the agency’s response during Hurricanes Harvey and Irma but has been under scrutiny for his use of government vehicles. In April, Long announced that North Carolina would be the first state where FEMA staff would embed with a state emergency management agency.

North Carolina Gov. Roy Cooper, a Democrat, must also prove himself after criticism that his administration spent only a fraction of federal disaster funding allocated to the state for rebuilding after Hurricane Matthew. (Cooper’s office notes that the state has spent a total of $751 million of state, local and federal money on Matthew recovery, and the governor and legislative leaders are planning for a special session focused on Florence relief.)

South Carolina Gov. Henry McMaster, a Republican, also has something to prove — that he can step out from the shadow of former Gov. Nikki Haley. McMaster, the former lieutenant governor, ascended to his state’s top job last year when Haley joined the Trump administration. He now faces the most substantive test of his tenure, weeks before voters will decide whether he has earned a full term.

Derrec Becker, a spokesman for the South Carolina Emergency Management Division, said there had been breaches of 11 privately owned dams in the state, though none have put people in harm’s way so far. With gauges still rising along South Carolina’s rivers, however, Becker struggled to give a fuller picture of the state’s problems.

Disaster keeps coming

“It’s very difficult for us to get a true sensing of the severity of the impact of the disaster,” he said Thursday, “because the disaster is still occurring.”

But McMaster has estimated at least $1.2 billion in losses, and acute challenges are in plain sight in both states.

Roads remain closed, blocked by barricades or state troopers, doubling or tripling trip times. National Guard vehicles rumble through small towns or idle outside Big Lots stores and baseball fields. Helicopters are common sights, as are used sandbags and plastic bags signaling dry gas pumps. From a Goldsboro, N.C., restaurant with a barbecue buffet to a service station just over the state line in South Carolina, people compare notes about what happened and what still might.

For many people in North ­Carolina, the worst is over. What is coming next is most worrisome in the south, in places like Conway, S.C., the seat of Horry County, which is among the state’s most populous. The region is still reeling from its first brush with the storm — public schools have been closed since Sept. 11 and debris is piled up — but there may be more to come as the Waccamaw rises.

Deep tragedy has already scarred Horry County. On Tuesday, a pair of county sheriff’s deputies were taking two female mental health patients in a van that was overtaken by floodwaters in adjacent Marion County. The deputies escaped, but the two women were trapped in the van and drowned.

There have also been bitter disagreements over tactics here. The Conway City Council briefly considered filing an injunction against the state and county to stop the erection of flood barriers along a stretch of highway into Myrtle Beach, concerned that the structures would cause more flooding elsewhere. The city eventually backed off after McMaster intervened with a call to the mayor.

In Conway, some still believe the hastily constructed flood barrier is a bad idea. The Waccamaw’s major flood stage at 14 feet, and it is projected to reach 22 feet by Tuesday.

At the Bonfire Taqueria, owner Darren Smith, 49, said he was worried that the sandbags would bottleneck the river, threatening not only his restaurant and the jobs of his 50 employees, but hundreds of properties that are not covered by flood insurance.

“Let the river go,” said Smith, whose restaurant is on a scenic river walk that was sloshing with water days before the river’s expected crest. “Let it do its thing, and you know, maybe we need to quit building. There’s too much asphalt as it is and not enough ground absorption. I’m no tree hugger, but damn, it’s affecting us this bad, and we’re the ones doing it.”