NEW YORK (Reuters) - The March floods that punished the U.S. Midwest have trapped barrels of ethanol in the country’s interior, causing shortages of the biofuel and helping to boost gasoline prices in the western United States.

FILE PHOTO: A motel, restaurant and travel stop are shown surrounded by flood waters in this aerial photo in Percival, Iowa, U.S., March 29, 2019. REUTERS/Tom Polansek/File Photo

The historic floods have dealt a series of blows to large swaths of an ethanol industry that was already struggling with high inventories and sluggish domestic demand growth.

The ethanol shortages are one factor pushing gasoline prices in Southern California, including Los Angeles, to the highest in the country, and they could top $4 a gallon for the first time since 2014, according to tracking firm GasBuddy.

Benchmark price for ethanol used in most supply contracts initially jumped on news of the floods but has been hobbled by rising waters around the Chicago hub that have halted barges and sales. That stands in contrast to prices on the coasts, which rose dramatically - drawing in heavy imports from Brazil, the main U.S. ethanol competitor.

The floods inflicted billions of dollars in damage to crops and homes in the U.S. Midwest, and knocked out roughly 13 percent of ethanol capacity.

U.S. ethanol is made from corn and required by the government to be blended into the country’s fuel supply to reduce emissions.

While some ethanol plants were flooded, the primary effect of the rising waters was to shut rail lines that serve as the main arteries for corn and ethanol deliveries.

Ethanol prices on the coasts spiked due to shortages, but Midwest producers have been unable to take advantage because of washed-out rail lines, market sources told Reuters.

“Unfortunately for anyone who was impacted by logistics issues it was a double whammy. You couldn’t capture the rally,” said one trader.

At Chicago’s Argo terminal, the nation’s main ethanol pricing hub, the cash price for ethanol fell for an eighth straight session last week to $1.29 a gallon, the longest downward skid since April of last year, according to Oil Price Information Service, which does daily assessments.

Initially, fears of widespread plant outages boosted that benchmark, but plants proved more resilient than expected, continuing to produce despite logistical challenges.

U.S. ethanol inventories were at 24 million barrels for the week ended March 29, just off a record hit a week earlier, according to U.S. Energy Information Administration data.

Chicago’s price acts as the benchmark for millions of barrels bought and sold via longer-term supply contracts each day. While that price faltered, ethanol prices at the coast have surged, helping plants owned by Pacific Ethanol Inc and White Energy in California and Texas to take advantage of higher prices.

Ethanol delivered into Los Angeles typically trades at 20 cents a gallon higher than Chicago, but that premium rose to as high as 50 cents a gallon, traders said. The price in New York Harbor was at roughly double normal levels, traders said.

The tight ethanol supplies, along with refinery outages, boosted retail gasoline prices and led to some gas station shutdowns in the West as blenders there lacked the ethanol needed to blend with gasoline to make fuel that meets government regulations.

Gas prices in Arizona averaged $2.89 per gallon on Monday, 17 percent higher than last month, according to the American Automobile Association. Prices were even steeper in California at $3.80 a gallon, well above the national average of $2.74 a gallon.

Cash prices in the state’s physical market suggest further increases. In Los Angeles, spot gasoline on Monday was offered 10 cents a gallon higher from where it traded on Friday, putting it at a premium of 69 cents a gallon above the NYMEX futures benchmark.

“Ultimately, Los Angeles could get close to seeing that average at $4 a gallon,” Patrick DeHaan, head of petroleum analysis at tracking firm GasBuddy, said, adding that much of that increase will come because of refinery outages in the state.

At least one county in California has already surpassed $4 a gallon. The highest recorded average price for the state was $4.67 a gallon, in October 2012, according to AAA.

The high coastal prices attracted barrels from the biggest U.S. competitor: Brazil. Overall ethanol imports to the United States totaled 558,279 barrels in March, the most seasonally since 2013, according to Refinitiv Eikon ship tracking data. Most of the imports during the month came from Brazil, according to the tracking data.