HOUSTON/NEW YORK (Reuters) - Retail U.S. gasoline prices surged to two-year highs on Friday and global shipping routes were scrambled, even as some U.S. oil refineries began restarting in the wake of Hurricane Harvey.

Major fuel pipelines feeding the U.S. Northeast and Midwest were shut or severely curtailed, prompting shortages and dramatic spikes in wholesale cash prices that pushed the national retail average to $2.519 a gallon, the highest since August 2015.

Harvey raked across the Texas Gulf coast, roiling global fuel markets as it knocked out about 4.4 million barrels of daily refining capacity, slightly more than Japan uses. 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, which included a rare cargo of jet fuel.

After record rains and flooding, the storm’s effects will be felt for weeks, possibly months. Only some restarts have begun so far.

Governor Greg Abbott said on Friday Texas will not run out of gasoline despite refinery issues.

“There’s plenty of gasoline in the state of Texas,” Abbott said at a news conference. “Don’t worry. We will not run out.”

The U.S. Energy Secretary approved an additional release of crude oil from the Strategic Petroleum Reserve, adding 3.5 million barrels to the 1 million barrels approved as of Thursday.

The Explorer Pipeline, which hauls fuel from the U.S. Gulf Coast to the Midwest, targeted a restart of its main lines on Sunday and Monday.

The Colonial Pipeline, the biggest U.S. fuel system, remained partially closed but said it kept operating its system east of the flood-hit areas in Texas.

Refiner Motiva warned customers along the Colonial route to prepare for shortages, a source at a fuel distributor supplied by Motiva said on Friday.

Marathon Petroleum Corp's MPC.N 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, Citgo Petroleum Corp PDVSAC.UL said it was beginning to restart its 157,500-barrel-per-day (bpd) refinery, while Flint Hills Resources and Valero Energy Corp VLO.N were also moving to restart their plants, sources said.

LIGHT AT END OF TUNNEL

Benchmark U.S. gasoline futures RBc1 surged more than 15 percent after Harvey hit. But on Friday, U.S. gasoline margins RBc1-CLc1 tumbled more than 5 percent and gasoline futures RBc1 fell almost 2 percent, their first daily loss since the storm.

“Yesterday, the anxiety over Harvey reached a crescendo,” said John Kilduff, partner at energy hedge fund Again Capital LLC. With the restarts, “you can see the light at the end of the tunnel.”

The biggest U.S. 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: tmsnrt.rs/2xzsKWz)

Other plants in the Beaumont/Port Arthur area will probably face challenges restarting. Waters have kept rising even as flooding receded in Houston, some 85 miles (137 km) west.

The U.S. average for a regular gallon of gasoline rose to $2.519 as of Friday morning, the highest since August 2015 and a 17.5 cent increase since Aug. 23, before the storm began, according to motorists advocacy group AAA.

Stiffer increases were reported in the U.S. Southeast. Pump prices in South Carolina have jumped nearly 30 cents a gallon. Prices were up nearly 20 cents in Texas.

SHORTAGE WORRIES

Suppliers in the Chicago area hoped to avoid shortages and taking steps to try to prevent them as wholesale prices kept rising.

A gas station submerged under flood waters from Tropical Storm Harvey is seen in Rose City, Texas, U.S., on August 31, 2017. REUTERS/Jonathan Bachman

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 serving Chicago have not yet hinted about fuel shortages, said Mario Orlandi, an operations manager at Olson Service Co, which supplies diesel and gasoline to the area.

“Cross our fingers, keep our tanks full,” Orlandi said.

GLOBAL IMPACT

In Venezuela, where financially strapped state-run PDVSA faced the possibility that scheduled deliveries, tankers floating offshore for weeks due to non-payment, will now travel 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 were also seeking to tap some of the 7 million barrels of fuel sitting in the Caribbean sea.

In Brazil, state-controlled oil company Petroleo Brasileiro SA PETR4.SA has hiked gasoline and diesel prices twice for September to match spikes in U.S. prices caused by Harvey. [L2N1LI1VD] Elsewhere, OPEC officials voiced frustration that Harvey did not boost crude prices, despite the major disruption of U.S. energy infrastructure.

The U.S. Customs and Border Patrol said it received a request to waive the Jones Act, which mandates the use of U.S.-flagged vessels to transport merchandise between the nation’s ports.

Supplies from distant markets may not arrive soon enough to avert a crunch due to partial Colonial Pipeline closure.

“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. Concerns were mounting ahead of the U.S. Labor Day extended weekend.

(For a graphic on Harvey's impact on energy markets, click tmsnrt.rs/2iK0YD9)