* Storm to linger off coast of Texas through Tuesday
* Houston crippled by floods, port closes
* Numerous refineries knocked out by Harvey
* Brent crude initially supported by Libyan blockade
* WTI discount to Brent at widest since Sept 2015 (Updates throughout, changes dateline from SINGAPORE)
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 numerous 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 eased, but losses were capped as pipeline blockades in Libya slashed the OPEC country's production by nearly 400,000 barrels per day.
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, and that floods would spread from Texas eastward to Louisiana.
Texas is home to 5.6 million barrels per day (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.7352 by 0948 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 may also be around 300,000 bpd of onshore U.S. production shut in, trading sources said.
U.S. West Texas Intermediate (WTI) crude futures were down 52 cents at $47.35 a barrel.
Brent crude was down 12 cents at $52.29 per barrel.
These opposing price movements pushed the WTI discount versus Brent to as much as $5.06 per barrel, the widest in two years.
(Additional reporting by Henning Gloystein in Singapore; Editing by Dale Hudson)