Hurricane Harvey began with raging winds, but its legacy will be water. Seemingly endless, relentlessly insidious water — a staggering 40 inches or more that swamped parts of Houston in just five days.

Harvey scooped tons of water from the sea and hurled it down on the nation’s fourth-largest city, drowning vast swathes of the landscape and battering it with almost a year’s worth of rainfall.

Rooftops became islands poking up through swirling floodwaters. Thousands of houses were destroyed, and tens of thousands more, soaked and pounded by the storm, could face the wrecking ball.

The water — and the muck and mold that follow — will create misery that will linger for years and likely cost tens of billions of dollars all told.

For many of the displaced in southeast Texas, floodwaters stole every possession, leaving them to navigate insurance forms and federal disaster aid applications as they ponder how to even move forward.

The deluge will instill deep anxiety, too, for many who lived through Harvey, and inflict lasting emotional scars on some survivors.

In a storm destined for the history books, it’s the ravages of the water that define the story.

—WATER SATURATES

A broken pipe in a house is reason to call a plumber. A house buried in water for weeks could mean it’s time for the demolition crew.

It’s too soon to know how many of more than 37,000 heavily damaged homes in Texas are salvageable, but Houston officials say some will be submerged in water for up to a month. Thousands have already been destroyed in the state. Evacuees are slowly returning to their inundated homes, and others are staying in government-paid hotels .

The longer a house is under water, the greater the damage.

Furniture, refrigerators and other appliances will almost certainly be ruined. Water can compromise or ruin wallboard, electrical systems, insulation, doors, windows and cabinets. Wooden floors warp, swell and can even float away; mold grows in the moist, humid interior, posing the risk of respiratory problems.

For those that can be repaired, civil engineers recommend that after the contaminated water and muck are removed, it’s best to strip out the wallboard and insulation so the house is reduced to the studs, which must be dried before any rebuilding begins.

Steve Cain, a Purdue University extension disaster specialist, offers simple advice:

“You don’t want to be rushing into your home after a flood,” he says. “You want to make sure to go back when it’s safe. … You can fall through a floor, gas lines could be leaking, electrical systems can be damaged and if the electricity is not shut off, you can get electrocuted.”

— WATER SCOURS

A few inches of rain can snarl traffic. Forty inches or more of water pounding the pavement in less than a week can undermine the streets people drive on every day.

The relentless pressure of water can loosen the foundation of asphalt roads — compacted soil, gravel or sand — leading to cracking and potholes. Pieces of pavement can slide away.

Big bridges will fare better in Texas. They’re likely to escape major damage because the flooding was caused by the gradual rising of water, according to Julio Ramirez, professor of civil engineering at Purdue.

This is in contrast to some other natural disasters. For example, when an earthquake-induced tsunami hits a coastal area, bridges can be weakened when they’re struck by large debris — sometimes even cars and buildings — carried by the force of the giant tidal wave, Ramirez says.

Andy Herrmann, past president of the American Society of Civil Engineers, says the great majority of Texas bridges aren’t vulnerable to damage from heavy rains because they’re built on piles or caissons — often hollow pipe filled with concrete.

But the smaller ones that sit on soil or rock, he says, could run into trouble if rapidly moving floodwaters eat away at the foundation, a process known as scouring. If that happens, a bridge could tilt or collapse.

Jeff Lindner, of the Harris County Flood Control District, also says pipelines could be subject to scouring, exposing them and making them more susceptible to breaking.

During the 1994 floods in the Houston area caused by about 20 inches (50 centimeters) of rain, eight pipelines broke across the San Jacinto basin, spilling almost 1.5 million gallons (5.68 million liters) of oil and petroleum products. Federal officials say more than 500 people suffered injuries, mostly minor burns, when fuel from those pipeline breaks ignited.

— WATER DISPLACES

New Orleans was transformed by the devastating impact of water from Hurricane Katrina. Now the same thing is happening in Houston, displacing people and businesses and disrupting the local economy.

Experts expect the recovery from Harvey to go far smoother than that of post-Katrina .

“I think Houston will rebound much more gracefully, more quickly than New Orleans,” says Mark Zandi, chief economist at Moody’s Analytics. “People aren’t going to leave. It’s a diverse economy.”

Zandi notes that New Orleans’ economy depends almost entirely on tourism and energy, while Houston prospers from health care, transportation, oil refineries and the chemical industry, among others.

Houston is part of a coastal region that supplies nearly a third of U.S. oil-refining capacity. Its port is the nation’s second-busiest. The city is headquarters to 20 Fortune 500 companies. NASA’s Johnson Space Center is also based there.

Houston has 2.3 million people. New Orleans is home to less than 400,000 residents, about 90,000 fewer than pre-Katrina levels.

Though Zandi expects Houston to come back strongly, he says, that depends, in part, on a strong federal disaster aid package. And he adds some people who are thinking of moving to Houston may have reservations because this is the third big storm since 2015.

Moody’s estimates the total economic loss from Katrina at $175 billion and Harvey’s could be as much as $108 billion. But it’s too early to know the full scope of the Texas disaster.

As Zandi says: “It’s a script still being written.”

— WATER SICKENS

Long after the danger of drowning subsides, water, oddly enough, can wreak havoc on your health — by forcing you to dry places.

Thousands of Houston area storm survivors who fled flooded homes found refuge in large shelters, but those temporary living quarters can become incubators for infections.

“You have all these people congregated together very closely for prolonged periods of time,” says Dr. William Schaffner, an infectious diseases specialist at Vanderbilt University Medical Center. “That’s an ideal circumstance for the spread of respiratory infections.”

Schaffner also warns that evacuees in crowded shelters can develop norovirus, a highly contagious intestinal infection marked by vomiting and diarrhea — an illness that has been known to occur on cruise ships.

New health problems can arise once flood victims return homes. Inside, mold can cause breathing troubles, but that can be avoided by wearing a mask. Outside, standing pools of stagnant water contaminated by chemicals and garbage, become ideal breeding spots for mosquitoes. A bite can have serious consequences.

“We worry about West Nile virus, certain kinds of encephalitis viruses,” Schaffner says.

Houston may be able to minimize the risks because it has a strong mosquito abatement program if it can be re-established, according to Schaffner.

Houston’s floodwaters, contaminated by lawn pesticides, spilled fuel and runoff from oil refineries and chemical plants, also pose potential health risks, according to experts . State officials reported several dozen sewer overflows in hurricane-impacted areas, though the public works department in Houston has reported its water is safe.

Another concern are Superfund sites, some of the most polluted places in the nation. The Associated Press surveyed seven of these toxic sites and found all had been inundated with floodwaters. After that report, Texas Gov. Greg Abbott said the state will be working with the Environmental Protection Agency to deal with any possible threats of contamination.

— WATER HAUNTS

Superstorm Sandy. Katrina. And now Harvey.

The epic disasters in the New York metro area and New Orleans left residents in both places wrestling with the emotional anguish of losing their homes, their livelihoods and their sense of security. The same psychological trauma is likely to emerge in southeast Texas.

Those feelings can linger for years. One study found that residents in the path of Sandy suffered from depression and post-traumatic stress. Another concluded that children displaced by Katrina still had serious emotional or behavioral problems five years later.

Some of the most common stress-related reactions to disasters such as Harvey are anxiety, a change in appetite, insomnia and a sense of uncertainty — a feeling of what’s next, according to Dr. Anita Everett, president of the American Psychiatric Association. Headaches or aches and pains can also surface, she notes.

“It’s a little bit like a grieving process,” Everett says. “We sort of expect that there’s going to be waves of worry, waves of anxiety and that’s all within the normal experience.” But she says that those who are struggling three months after a disaster and can’t work or make decisions may want to seek professional help.

Being in a large shelter, though, can boost the spirits of storm survivors because they can share stories and turn to each other for support, Everett says.

“You get a really strong sense of a community that’s coming together and working together to rise to the occasion … Humans are amazingly resilient.”