(Updates death toll, mayor imposing curfew, space in shelters running short)
HOUSTON, Aug 29 (Reuters) - President Donald Trump visited Texas on Tuesday to survey damage from the first major natural disaster to test his leadership in a crisis, as record rainfall from Tropical Storm Harvey lashed Houston and tens of thousands of people fled deluged homes.
The slow-moving storm has brought catastrophic flooding to the Texas, killing at least 12 people and paralyzing Houston, the America's fourth most populous city. Damage was expected to run well into the tens of billions of dollars, making it one of the costliest U.S. natural disasters.
City officials were preparing to temporarily house some 19,000 people, with thousands more expected to flee the area as the flooding entered its fourth day and authorities found themselves running out of space in cramped shelters.
The Mayor of Houston imposed a 10 p.m. to 5 a.m. curfew.
Nearly a third of Harris County was under water, an area 15 times the size of Manhattan, according to the Houston Chronicle newspaper. Forecasters warned the rain would continue through Thursday, badly straining the dams and drainage systems that protect the low-lying U.S. energy hub.
Harris County officials warned residents to evacuate as they released water from overflowing reservoirs to alleviate pressure on two dams, a move that would add to flooding along the Buffalo Bayou waterway that runs through the area.
Residents within 1.5 miles (2.4 km) of a chemical plant in Crosby were also ordered to evacuate due to the rising risk of an explosion.
Trump, speaking in Corpus Christi near where Harvey first came ashore last week as the most powerful hurricane to strike Texas in more than 50 years, said he wanted the relief effort to stand as an example of how to respond to a storm.
"This was of epic proportion. Nobody's ever seen anything like this," Trump said of Tropical Storm Harvey as he met with state and federal officials for a briefing at a Corpus Christi fire station.
POLICE OFFICER AMONG DEATHS
The president said he was pleased with the response so far, but it was too soon to take a victory lap.
"We won't say congratulations. We don't want to do that.... We'll congratulate each other when it's all finished," he said.
After Corpus Christi, Trump was headed to the state capital Austin to meet with officials. Houston was not on his itinerary because much of it is impassable.
Harvey has drawn comparisons with Hurricane Katrina, which devastated New Orleans 12 years ago, killing 1,800 people and causing an estimated $108 billion in damage.
Former President George W. Bush was widely criticized for his administration's handling of the response to that disaster, taking a heavy toll on public support of his administration, and Trump clearly was aiming to avoid a similar reaction.
Among the 12 confirmed fatalities as of Tuesday evening was a family of six and Houston Police Sergeant Steve Perez, a 34-year veteran of the force who apparently drowned while attempting to drive to work on Sunday, Police Chief Art Acevedo told reporters.
Acevedo said in an emotional press conference that Perez' family had urged him not to leave the house because of the dangerous flooding but the 60-year-old policeman told them, "We have work to do."
Some 3,500 people have been rescued from high waters in the Houston area with police, firefighters and National Guard troops continuing to try to locate those marooned in high waters.
'I JUST LOST MY HOUSE'
Large numbers of civilians also formed ad hoc rescue groups, many using boats to pluck neighbors from flooded homes.
Gloria Stilwell, 44, who described herself as a stay-at-home mom, said she agreed with Trump's assessment that Houstonians were well equipped to handle the storm.
"I totally agree with him. Texas can definitely handle it," Stilwell said as she registered to volunteer at a shelter. "I've lived here since 1980, through plenty of hurricanes. Texans have always banded together."
Nurse Lisa Ike, 39, was less impressed.
"Texas can handle anything? I just lost my house and three cars. We need help," Ike said, adding that she had not voted in the presidential election and had not yet made up her mind about Trump.
"My opinion will be made by how he handles this situation," she said
The National Hurricane Center on Monday afternoon said a preliminary report from Texas shows a record 51.88 inches (131.78 cm) of rain has fallen due to Harvey, a record for any storm in the continental United States. The gauge was in Highlands, Texas, east of Houston.
This breaks the previous record of 48 inches set during tropical storm Amelia in 1978 in Medina, Texas, the NHC said. Medina is west of San Antonio. The island of Kauai was hit with 52 inches of rain from Tropical cyclone Hiki in 1950, before Hawaii became a U.S. state.
About 9,000 evacuees were staying at Houston's George R. Brown Convention Center and Houston Mayor Sylvester Turner said his office had asked the Federal Emergency Management Agency for assets to allow the city to shelter another 10,000 people.
Other shelters were set up in Dallas, about 250 miles (402 km) to the north, for about 8,000 people, and Austin, 160 miles (258 km) west, to take in 7,000 people. The Red Cross said it had 34,000 cots in the region and enough food for that many people.
Standing outside a makeshift transit hub in Houston, Cypress Independent School District Police Sergeant Shane Wallace said he was taking whatever offers of lodging he could get, including families opening their homes.
"We're running out of space," he said.
Harvey was also drenching Louisiana 12 years after Hurricane Katrina hit the state and killed 1,800 people.
The slow-moving storm's center was in the Gulf of Mexico about 70 miles (150 km) southeast of downtown Houston by Monday evening.
It was expected to linger just off the coast of Texas through most of Tuesday before moving inland again late Tuesday or early Wednesday, according to the U.S. National Hurricane Center.
Harvey was expected to produce another 6 to 12 inches (15 to 30 cm) of rain through Thursday over parts of the upper Texas coast into southwestern Louisiana.
The Gulf of Mexico is home to half of U.S. refining capacity. The reduction in supply led gasoline futures to hit their highest level in two years this week as Harvey knocked out about 16 percent of total U.S. refining capacity, based on company reports and Reuters estimates.
(Additional reporting by Gary McWilliams, Ernest Scheyder and Erwin Seba in Houston; Andy Sullivan in Rockport, Texas; Jon Herskovitz in Austin; Steve Holland in Corpus Christi, Texas; Bernie Woodall in Fort Lauderdale, Florida; and David Gaffen in New York; Writing by Scott Malone and Dan Whitcomb; Editing by Bill Trott and Lisa Shumaker)