* Nearly a quarter of U.S. refining capacity out
* Benchmark U.S. gasoline prices surge in overnight trading
* 'Worst thing in U.S. in decades' for energy mkt -source
* Europe, Asia traders rush to reroute cargoes to Americas (Updates prices, adds details on Asian, European trade flows)
HOUSTON/NEW YORK, Aug 31 (Reuters) - Tropical Storm Harvey's impact on the energy industry spread beyond flooding U.S. refiners as fuel pipelines were also shut, threatening to squeeze national supply and roil global fuel markets as U.S. retail fuel prices continue to climb.
The storm, which lashed Louisiana with rain on Thursday, has pummeled the U.S. Gulf Coast, immersing Houston, Texas and the surrounding area in several feet of water and forcing the closure of about a quarter of U.S. refining capacity.
Benchmark U.S. gasoline prices and margins <RBc1-Clc1> surged anew on Thursday. The jump came after the Colonial Pipeline, the biggest U.S. fuel system, said it would shut its main lines to the Northeast by Thursday amid outages at pumping points and lack of supply from refiners.
That artery can carry 3 million barrels of gasoline and other products daily.
At least two East Coast refineries have run out of gasoline for immediate delivery as they scrambled to fill barges for markets normally supplied by the Gulf Coast, two refinery sources said.
Others were seen running at higher rates to boost profitability by filling shortages.
"This is going to be the worst thing the U.S. has seen in decades from an energy standpoint," said an East Coast market source, who declined to be named as he was not authorized to speak to the press.
Concerns over fuel shortages ahead of the U.S. Labor Day extended weekend were mounting, said analysts at JBC Energy.
U.S. gasoline futures topped $2 per gallon for the first time since 2015, with benchmark prices up more than 20 percent since the Aug. 23 close, just before the storm began.
U.S. crude oil prices were on track for their steepest monthly losses in more than a year.
Average U.S. retail fuel prices have surged by more than a dime per gallon from a week ago, the AAA said early on Thursday.
The Gulf makes up nearly half of total refining capacity in the United States, the world's largest net exporter of refined petroleum products, and the storm is set to impact global flows. (Graphic: http://tmsnrt.rs/2xzsKWz)
About 4.4 million barrels of U.S. refining capacity have been shut by Harvey, including the nation's largest refiner, Motiva Port Arthur, which can process more than 600,000 barrels a day. The total shut-in is about 24 percent of U.S. refining capacity, almost equal to Japan's daily consumption.
Traders in Europe scrambled to reroute cargoes to the United States and Latin America to fill the gap left by refining and shipping closures, but supplies may not arrive fast enough to avert a crunch.
"Sourcing additional barrels from Europe is a potential solution, but an increased level of uncertainty is introduced surrounding the timeliness of delivery given the logistics of travel time and securing tankers," said Michael Tran, director of global energy strategy at RBC Capital Markets.
The crippling of the U.S. Gulf Coast refining hub by Harvey rattled global fuel markets on Thursday as traders rushed to buy gasoline and diesel from distant markets to avert supply shortages in the Americas.
Refiners in Asia have also been trying to fix fuel cargoes to the United States, despite the massive distance across the Pacific.
The Asian refining margin on Thursday hit $10.41 a barrel, the highest since January 2016 <DUB-SIN-REF>. Gasoline prices in the region < GL92-SIN-CRK> were $16.34 a barrel, also the highest since January 2016.
Traders have said a slew of gasoline tankers was booked over the past two days out of Europe to the United States and Latin America.
The U.S. disruptions have hit wholesalers. The premium for Chicago-area gasoline above benchmark futures is at its highest since June 2016, while the Gulf Coast price is at its widest above futures since August 2012.
Suppliers in Chicago were trying to secure supplies after the Explorer Pipeline, which typically carries about 350,000 barrels a day (bpd) to the region, shut down.
"It's not a significant problem at the present time, but it could turn into one," said William Fleischli, executive vice president of the Illinois Petroleum Marketers Association, which represents 400 fuel distributors. Fleischli said much depended on how long the shutdowns last.
Average retail gasoline prices have risen to $2.449 per gallon nationwide, up 4.5 cents a gallon from a day earlier and 10.1 cents from a week ago, AAA data showed.
In Georgia and North Carolina, fuel prices are up about 17 cents and average prices in South Carolina have risen nearly 20 cents per gallon from a week ago.
Though flood waters have yet to recede, energy analysts said they anticipated potential long-term effects from the historic storm. Goldman Sachs analysts wrote Wednesday they expected about a tenth of what is now offline to stay shut for several months.
(Reporting by Erwin Seba and Devika Krishna Kumar; additional reporting by Catherine Ngai, Julia Simon, Jarrett Renshaw, Henning Gloystein, Chris Prentice, Karolin Schaps, Ron Bousso and Seng Li Peng; Writing by David Gaffen; Editing by Greg Mahlich and Bernadette Baum)