California had its largest single-day gasoline price spike in almost five years Thursday, leading to long lines at the pump, gas shortages and even station closures. | » Huge 19.2-cent overnight spike

Experts said the price increases could continue for weeks and the average might even break the $5 mark. Already by Thursday afternoon, at least five Los Angeles area gas stations had crossed the $5 per gallon mark, according to GasBuddy.com, including one charging $5.29 per gallon in Burbank and another at $5.11 in Norwalk. One station in Calabasas was even charging $5.69. | See photo gallery.

A refinery closure, a contaminated pipeline and the state's strict pollution limits are all, in part, to blame, experts said. Gasoline inventories across the state are lower than they have been in more than 10 years.

The cost of gasoline in California jumped 8.3 cents Thursday to $4.32 per gallon, up 18 cents over last week, according to the AAA's Daily Fuel Gauge. The national average Thursday was $3.78.

This set California as the most expensive U.S. state in which to buy gasoline.

Kloza said it was likely that California's record average gasoline price of $4.61 a gallon, set in June 2008, would be broken.

The average price of gas Thursday in Los Angeles was reported at $4.35 a gallon.

Patrick DeHaan, senior petroleum analyst at GasBuddy.com, said California prices should continue to rise as retail prices catch up with wholesale prices.

"Wholesale prices have gone up $1 a gallon in the last week alone, and retail prices have only followed for 30 cents, so there unfortunately is room for retail prices to climb, and that's likely what they'll do," DeHaan said.

In recent weeks, California refineries have dropped production in anticipation of switching over to a "winter blend" of gasoline, which emits more polluting emissions, next month.

California's summer-blend fuel requirements are in effect in Southern California until Oct. 31.

The California Independent Oil Marketers Association, a Sacramento-based group that represents wholesale and retail fuel marketers, asked the state Wednesday to expedite a waiver that would allow refiners to produce and sell winter-grade fuel, said spokesman Jay McKeeman.

"Everybody is concerned about what might happen," he said. "The real question is: How long is this going to last and what can the state do?"

At the same time, a power outage at ExxonMobil Corp.'s 150,000-barrel-per-day Torrance refinery Monday and a shutdown of the crude distillation unit at Chevron Corp.'s Richmond refinery contributed to the tight supplies.

Gesuina Paras, an Exxon spokeswoman in Torrance, said the refinery may burn off flammable gas released by pressure relief valves for a week as it restores production following a power failure that shut down some units and slowed output from others.

Chevron also has had problems with a refinery and a pipeline.

The Kettleman-Los Medanos pipeline, which carries 85,000 barrels per day of crude oil from the state's Central Valley to refineries in the San Francisco Bay Area, has been closed since mid-September due to the presence of elevated organic chloride levels in the crude stream.

In addition, Chevron's 240,000-barrel-a-day Richmond plant, the largest refinery in Northern California, has been running at reduced capacity since a fire Aug. 6.

Adding to California's gasoline woes, maintenance work at the Phillips 66 plants in Rodeo and Arroyo Grande has slowed production as well.

"It's a series of unfortunate events," Kloza said. "This is not something that is going to last for months. This is something that is going to last for days or weeks."

"The squeeze is on, and people are doing desperate things," said Van der Valk. "The mom and pop gas stations are having to close down from either not being able to obtain gasoline from their regular distributor or cannot afford the break-even price of almost $5 per gallon."

McKeeman said the independent gas station owners are typically the first to run out of fuel and shut their pumps when spot prices surge because they often lack long-term contracts to buy from fuel suppliers at set prices, McKeeman said.

Gasoline station owners in Southern California have stopped making wholesale purchases to fill their underground tanks since the price of gas has shot up in the past week, he said.

Even the Costco discount store chain, which typically has some of the cheapest prices, is starting to run dry or is seeing long lines at its pumps.

Customer Jorge Reveles, 67, of Fontana hoped to fill his gas tank after shopping at Costco in Fontana, but he learned that wouldn't be a likely possibility once he drove up to the closed gas pumps.

"I have no idea what's going on," Reveles said. "I thought I'd be getting gas here today, but I guess I'll have to drive down the street."

Costcos throughout the region also stopped selling gas Thursday, including in Simi Valley, Northridge, Alhambra and Azusa. A Costco station in Van Nuys was among those still operating Thursday.

Greg Bond, assistant warehouse manager at the Simi Valley store, said the shortage hit on Wednesday.

"There are definitely some supply issues out there," Bond said. "Unfortunately I don't know how long it will take to fix at this point."

Low-P, a gas station in Calabasas, put signs on its pumps apologizing for the high prices. On Thursday regular was $5.69 a gallon, and premium $5.89.

Tanya Barklhordar, the station's manager, said they will sell gas as long as they have it and that the situation is difficult for her and her customers.

At Costco locations that did have gas, lines of vehicles were waiting to fill up Thursday.

At a Lakewood location, where regular was just $4.17, lines eight cars deep were waiting at all 15 pumps.

Customers said the lines aren't unusual and happen throughout the week because of the low prices.

"The gas here is cheaper than anywhere else," said Helen Fordof Long Beach.

Costco's shortage has to do with the company being an independent gas provider.

Companies with their own refineries, such as BP, Shell, ExxonMobil, Valero, Tesoro and Sinclair, don't have to find gasoline on the open market, as independent gas providers do, DeHaan said.

"It's not surprising Costco is having a tough time finding gasoline, and other independents may have the same situation," DeHaan said. "That just shows the severity of the situation, which unfortunately solidifies why prices are rising, and that's because of limited supply."

However, Van der Valk called the price surge "a short-term problem" and said wholesale costs should start falling as Exxon's refinery returns to normal operations and other plants finish maintenance.

In the meantime, though, drivers and gas station operators will continue to feel the squeeze.

"We're not going to wake up tomorrow and find out this is a bad dream. It's real life, and unfortunately there is a clear potential for California to set a new record state high price," DeHaan said. "Even though that's not much consolation for those folks out there facing the pump, this will blow over, but it will take a matter of weeks until we see any relief."

Costco customers were greeted by a shopping cart barricade and a "Do Not Enter" sign at the entrance to the gas station at the Simi Valley location on Thursday, Oct. 4, 2012. (Andy Holzman/Staff Photographer)