* Nearly a quarter of U.S. refining capacity out
* National prices top $2.50/gallon for first time in 2 yrs
* Europe, Asia traders rush to reroute cargoes to Americas
* Motiva down for two weeks; Corpus Christi starts to reopen (Updates gasoline prices, adds Citgo, Marathon refinery restarts)
HOUSTON/NEW YORK, Sept 1 (Reuters) - Retail U.S. gasoline prices surged to two-year highs and global shipping routes were scrambled on Friday even as some of the nation's refiners restarted as Storm Harvey lost strength.
Major fuel pipelines feeding the U.S. Northeast and Midwest were shut or severely curtailed, prompting shortages and dramatic spikes in wholesale cash prices, and pushing the national retail average to $2.519 a gallon, the highest since August 2015.
The storm, which began as a hurricane a week ago, has roiled global fuel markets, and tankers carrying millions of barrels of fuel have been rerouted to the Americas to avert shortages. European refining margins hit a two-year high amid the surge in exports.
Indeed, the effects of the storm will continue for weeks, if not months, after Harvey hammered the Gulf Coast for days and brought floods that buried Houston and the surrounding area in several feet of water. It knocked out about 4.4 million barrels of daily refining capacity, slightly more than Japan uses daily, and only some restarts had begun.
Futures declined on Friday, for the first day out of five, as the worst of the storm had passed.
On Friday, Marathon Petroleum Corp's Galveston Bay Refinery in Texas City, Texas, had raised production to 45 percent of its 459,000 bpd capacity, sources told Reuters.
In Corpus Christi, where Harvey first made landfall, Citgo Petroleum Corp said it was beginning to restart its 157,500-barrel-per-day (bpd) refinery, while Flint Hills Resources and Valero Energy Corp were also moving to restart their plants, according to sources.
LIGHT AT END OF TUNNEL
Benchmark U.S. gasoline futures had surged more than 15 percent since the storm began, but on Friday, U.S. gasoline margins <RBc1-CLc1> tumbled nearly 11 percent and gasoline futures fell 5 percent.
Cash gasoline prices in the East Coast also eased, traders said, and New York harbor RBOB gasoline prices were last seen at about 40 cents above benchmark futures on the New York Mercantile Exchange.
"Yesterday, the anxiety over Harvey reached a crescendo," said John Kilduff, partner at energy hedge fund Again Capital LLC, adding that with the restarts, "you can see the light at the end of the tunnel."
But the nation's largest refiner, Motiva's Port Arthur facility, which can handle 600,000 barrels of crude daily, will be shut for at least two weeks, according to sources familiar with plant operations. (Graphic: http://tmsnrt.rs/2xzsKWz)
Other plants in the Beaumont/Port Arthur area are expected to face similar challenges restarting as waters continued to rise, even as flooding receded in Houston, some 85 miles (137 km) west.
U.S. crude prices remained under downward pressure, with the futures contract falling 0.4 percent to $47.02 a barrel.
The national average for a regular gallon of gasoline rose to $2.519 as of Friday morning, the highest since August 2015. That's a 17.5-cent increase since Aug. 23, before the storm began, according to motorists advocacy group AAA, with even gaudier increases in the U.S. Southeast, which relies heavily on Gulf supplies.
South Carolina, for instance, has seen prices rise nearly 30 cents, and prices were up nearly 20 cents in Texas, where fuel shortages were already evident.
Suppliers in the Chicago area were taking steps to prevent shortages, and banking on hope as wholesale prices continued to increase.
Dave Luchtman, owner and president of Lucky's Energy Service Inc., a small distributor in Chicago, has rented two storage trailers that hold 8,000 gallons each, expected to be delivered Friday.
"So I have a little lifeline," Luchtman said.
Refineries so far have not given any indication that there are fuel shortages, said Mario Orlandi, an operations manager at Olson Service Co, which supplies diesel and gasoline to the Chicago area.
"Cross our fingers, keep our tanks full," Orlandi said.
The global impact of the storm was being felt in Venezuela, where financially strapped state-run PDVSA is facing the possibility that scheduled deliveries - tankers floating offshore for weeks due to non-payment - will make their way to other Latin American destinations.
At least two cargoes scheduled to deliver to Venezuela currently in the port of Curacao are now expected to be delivered to Ecuador.
Mexico, Brazil, Colombia and other countries want to tap some of the 7 million barrels of fuel sitting in the Caribbean sea, according to three traders and shippers.
European and Asian traders have diverted millions of barrels of fuel to the Americas. That included a rare opportunity for exports of jet fuel from Europe to the United States, reversing the usual flow of shipments.
Supplies from distant markets may not arrive soon enough to avert a crunch after the Colonial Pipeline, the biggest U.S. fuel system, said it would shut part of its main lines to the Northeast.
"We are going to have outages from Texas to Boston," said one East Coast market source. The market is "way under-appreciating the magnitude of this."
Several East Coast refineries have run out of gasoline for immediate delivery as they sent fuel elsewhere, and concerns over shortages ahead of the U.S. Labor Day extended weekend were mounting.
(Reporting by Erwin Seba and Devika Krishna Kumar; Additional reporting by Jarrett Renshaw, Susannah Gonzales, Marianna Parraga, Karolin Schaps, Ron Bousso, Libby George and Seng Li Peng; Writing by David Gaffen and Libby George; Editing by Susan Fenton and Bernadette Baum)