* Storm to linger off coast of Texas through Tuesday
* Houston crippled by floods, port closes
* Several refineries knocked out by Harvey
* Brent crude initially supported by Libyan blockade
* WTI discount to Brent at widest since Sept 2015 (Updates prices)
LONDON, Aug 28 (Reuters) - Oil markets were roiled on Monday after Tropical Storm Harvey wreaked havoc along the U.S. Gulf Coast over the weekend, crippling Houston and its port, and knocking out several refineries as well as some crude production.
U.S. gasoline prices hit two-year highs as massive floods caused by the storm forced refineries in the area to close. In turn, U.S. crude futures fell as the refinery shutdowns could reduce demand for American crude.
Brent futures steadied as pipeline blockades in Libya slashed the OPEC state's output by nearly 400,000 barrels per day (bpd).
Harvey is the most powerful hurricane to hit Texas in more than 50 years, killing at least two people, causing large-scale flooding, and forcing the closure of Houston port as well as several refineries.
The U.S. National Hurricane Center said Harvey was moving away from the coast but was expected to linger close to the shore through Tuesday. It said floods would spread from Texas eastward to Louisiana.
Texas is home to 5.6 million bpd of refining capacity, and Louisiana has 3.3 million bpd. Over 2 million bpd of refining capacity was estimated to be offline as a result of the storm.
Spot prices for U.S. gasoline futures surged 7 percent to a peak of $1.7799 per gallon, the highest level since late July 2015, before easing to $1.7341 by 1341 GMT.
U.S. traders were seeking oil product cargoes from North Asia, several refining and shipping sources told Reuters, with transatlantic exports of motor fuel out of Europe expected to surge.
"Global refining margins are going to stay very strong," said Olivier Jakob, managing director of Petromatrix.
"If (U.S.) refineries shut down for more than a week, Asia will need to run at a higher level, because there's no spare capacity in Europe."
About 22 percent, or 379,000 bpd, of Gulf production was idled due to the storm as of Sunday afternoon, the U.S. Bureau of Safety and Environmental Enforcement said.
There might also be around 300,000 bpd of onshore U.S. production shut in, trading sources said.
Brent crude futures were up 2 cents at $52.43 per barrel. U.S. West Texas Intermediate (WTI) crude futures were down 50 cents at $47.37.
The price moves pushed the WTI discount versus Brent to as much as $5.24 per barrel, the widest in two years.
(Additional reporting by Henning Gloystein in Singapore; Editing by Dale Hudson and Edmund Blair)