The largest refinery in the U.S. is temporarily shutting down following devastating local floods from Hurricane Harvey and the aftermath, adding to a raft of factors driving gasoline prices higher.

The Saudi-owned Motiva refinery in Port Arthur, Texas, began what it called "a controlled shutdown" at 5 a.m. Wednesday.

The closure marks the latest in a series of outages at Texas Gulf Coast refineries that have led to a nationwide spike in gasoline prices. petroleum analyst Patrick DeHaan estimated Wednesday that gas prices would increase 15 cents to 25 cents per gallon nationwide as a result of Harvey — up from an initial forecast of 5 to 15 cents.

The nationwide average as of Wednesday morning was $2.40, up from $2.34 a week ago, according to AAA.

With Motiva down and other recent closures, about 25% of the nation's gasoline refining capacity is offline, GasBuddy petroleum analyst Patrick DeHaan said.

"It's a chilling effect on the refining industry, which is a dire state right now," DeHaan said.

The Motiva operation generated about 635,000 barrels per day, according to the Oil Price Information Service.

"Return to service is contingent upon recession of flood waters in the area," Motiva spokesperson Angela Goodwin said in a statement. "Our priority remains the safety of our employees and the community."

The plant was already operating at 60% capacity as of Tuesday afternoon and 40% on Tuesday evening.

Ripples through Upper Midwest

The Motiva refinery is just one of many that have shut down along the flood ravaged Texas coast as a precaution because of power grid issues and high water. Currently about one-fifth of the nation's refining capacity is off line.

"Today we've still got 15 refineries shut down and five more operating at a limited capacity," Roth told KARE. "That's 21 percent of our refining capacity here in the United States."

Erin Roth of the Wisconsin-Minnesota Petroleum Council said the loss of refining capacity in Texas coast will reverberate in the Upper Midwest, because there will be growing demand from other places for gasoline and diesel made and stored here.

"Petroleum products are fungible, meaning they can flow where they're needed," Roth explained.

"Right now the demand is very heavy in southern states, and some of that oil and fuel is flowing down to Texas and Louisiana right now."

Roth said most of the gasoline used in Minnesota comes from the two refineries in the Twin Cities and refineries in the Chicago area. And most of crude oil arriving at refineries in the Twin Cities now comes from Canada and North Dakota.

But what's happening on the Gulf Coast will eventually affect the demand for gasoline and diesel from local fuel terminals, such as those located in Roseville.

"When terminals shut down many times retail locations are put on what's called an allocation, and because of that limited supply truck drivers will drive far -- right now to Missouri from Texas -- to pull product back into the state. That tends to draw down on the supply in Minnesota, and it might be going to Texas or somewhere else."

He said the option of purchasing petroleum products from Europe is easier said than done, because it takes a week to 10 days to get those shipments to the US terminals.

"You've got to have a port open in order to offload that product. Port Arthur, Corpus Christi, even Galveston and Houston are all affected."

In a move that should help with the domestic fuel supply, the Environmental Protection Agency, or EPA has already allowed 12 states and the District of Columbia to move to the winter fuel formula rather than waiting until September 15 to do that. The winter mix has a higher Reid Vapor Pressure, which allows refineries to extract more gasoline per barrel of oil.

Roth said his organization will ask Gov. Mark Dayton to grant the same waiver here in Minnesota. The Dept of Commerce and the Minnesota Pollution Control Agency would need to agree to the accelerated schedule.

Price at the pump

The Wisconsin-Minnesota Petroleum Council is affiliated with the American Petroleum Institute, which is the trade group for the oil and natural gas industry. Roth said those organizations can't, according to federal law, speculate about gas price trends.

"We've seen some places in the Twin Cities raise their prices by 20 cents this week, but it's too early to tell what will happen as this plays out in Texas."

Roth urged Minnesotans not to overreact to the fear of rising fuel prices.

"We don't want people to go panic buy because you think the prices is going up five cents tomorrow," he said.

"You can make the problem worse because retailers' fuel supplies are based on historical averages. And you can screw that average up for their next load."

He noted that prices have hung in the $2.20 to $2.29 range throughout the summer. By contrast when Hurricane Katrina struck in 2005 the price at the pump was already more than $3.00 per gallon. It eventually rose into the $4.00 to $5.00 range in the aftermath of that disaster.