NEW YORK (Reuters) - Gasoline futures surged on Wednesday to a two-year high while crude oil was down, as flooding and damage from Tropical Storm Harvey shut nearly a quarter of U.S. refinery capacity, curbing demand for crude while raising the risk of fuel shortages.

FILE PHOTO: The Exxon Mobil Beaumont Polyethylene Plant is seen during tropical storm Harvey in Beaumont, Texas, U.S. August 28, 2017. REUTERS/Jonathan Bachman/File Photo

About 4.4 million barrels of U.S. refining capacity has been shut by Harvey, based on company reports and Reuters estimates. That represents nearly a quarter of U.S. refining production, and restarting plants under even the best conditions can take a week or more.

“As the refineries restructured the more competitive refineries have expanded,” said Antoine Halff, Director of the Global Oil Markets Research Program at Columbia University, “The capacity is now in the hands of a few very large players in a few very large plants.”

“It means if something goes wrong it’s a big impact.”

On Wednesday, Valero said that due to flooding they were fully shutting their Port Arthur refinery.

U.S. gasoline futures RBc1 were up 5.9 percent to settle at 1.8847 a gallon, having hit $1.9140, the highest since July 2015.

Brent oil LCOc1, the international crude benchmark, settled down $1.14, or 2.2 percent, to $50.86 a barrel. U.S. crude CLc1 settled down 48 cents, or 1 percent, to $45.96.

The spread between Brent and U.S. crude hit its widest in more than two years on Wednesday before settling at $4.90.

Gains intensified for refined products after sources on Wednesday said Total’s Port Arthur, Texas, refinery had been shut by a power outage resulting from the storm.

Gasoline margins RBc1-CLc1 climbed, as the gasoline crack spread jumped to $24.02 a barrel early in the session, the highest on a seasonal basis since 2012.

“If the refineries stay shut for more than a week or 10 days, it’s going to be very problematic,” said Olivier Jakob, analyst at Petromatrix.

While infrastructure restarts following the storm are expected to extend into the coming weeks, on Wednesday Marathon Petroleum Corp was restarting its Galveston Bay Refinery, said sources familiar with plant operations.

Harvey made landfall on Friday as the most powerful hurricane to hit Texas in more than 50 years, resulting in the death of at least 22 people.

Harvey was forecast to drop another 3 to 6 inches of rain on Wednesday, with a storm surge of up to 4 feet along the western part of Louisiana’s Gulf Coast.

With gasoline futures climbing, the AAA said retail gasoline prices were up 6 cents from a week ago at $2.404 per gallon of regular gasoline nationwide. Some states, like Georgia, have seen prices rise as much as 12 cents a gallon as reduced supply has hampered distribution.

In addition to shutting oil refineries, about 1.4 million bpd of U.S. crude production has been disrupted, equivalent to 15 percent of total output, Goldman Sachs said in a note.

The effects of the damage and shutdowns are expected to ripple for weeks. Explorer shut two main lines carrying fuel to the Chicago market Tuesday. Colonial Co, which moves more than 3 million barrels of fuel per day from the Gulf Coast to the East Coast, says many lines will be shutdown with no projected restart time.

The market shrugged off weekly inventory figures from the U.S. Energy Department, which reflect stocks prior to the storm.

Crude inventories USOILC=ECI fell by 5.4 million barrels in the latest week, far more than the decrease of 1.9 million barrels analysts had expected. Refining capacity utilization rose to 96.6 percent, the highest since 2005, a figure that will fall sharply due to massive shut-ins on the Gulf.

On Wednesday, industry sources told Reuters that Shell staff are reboarding the Perdido oil and gas platform in the Gulf of Mexico in preparation for a restart.

West African crude differentials were steady as strong margins countered Harvey’s impact.