* 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 prices)
By Henning Gloystein
SINGAPORE, Aug 28 (Reuters) - Oil markets were roiled on Monday after Hurricane 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.
Gasoline prices hit two-year highs as massive floods caused by the storm forced refineries across the U.S. Gulf Coast to shut down.
In crude markets, U.S. crude futures fell as the U.S. refinery shutdowns could reduce demand for American crude, while Brent futures also eased, giving up early gains due to pipeline blockades in Libya over the weekend.
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 (NHC) said on Monday that 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 of refining capacity per day, and Louisiana has 3.3 million barrels. Over 2 million barrels per day (bpd) of refining capacity were 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.7281 by 0703 GMT.
To avoid a fuel shortage, U.S. traders were seeking oil product cargoes from North Asia, several refining and shipping sources told Reuters on Monday.
"There may be meaningful and long-term damage to Texas' refining capacity," said Jeffrey Halley, analyst at futures brokerage OANDA.
Crude production was also affected, but to a lesser degree.
About 22 percent, or 379,000 bpd, of Gulf production was idled due to the storm as of Sunday afternoon, according to the U.S. Bureau of Safety and Environmental Enforcement. There may also be around 300,000 bpd of onshore U.S. production shut in, trading sources said.
U.S. West Texas Intermediate (WTI) futures were at $47.50 a barrel, down 37 cents, or 0.7 percent, from their last settlement.
"It may well be that the market feels the choke point in petroleum's value chain is not (crude) production, but refined products," Halley said.
If U.S. oil production is little affected, there could be excess crude as refiners stay shut and don't process crude to produce fuel.
In international oil markets, Brent crude was down 7 cents, or 0.1 percent at $52.34 per barrel. Brent was intially supported after Libyan pipeline blockades disrupted crude supplies, traders said.
These opposing price movements pushed the WTI discount versus Brent to as much as $4.99 per barrel, the widest in two years.
Although the full extent of the storm's damage is not yet clear, some analysts said the impact would be felt globally and affect energy markets for weeks.
(Reporting by Henning Gloystein; Editing by Kenneth Maxwell and Richard Pullin)