Gas prices jumped by nearly 40 cents a gallon overnight on Wednesday, shocking Minnesotans who likely will feel the sting of higher fuel prices well into summer.

Relief from four-buck gas could come by the Fourth of July, provided two major Midwest oil refineries are back on line by mid-June and the price of crude oil doesn't continue to rise, according to AAA officials who monitor gas prices.

The average price of gas in the Twin Cities was about $3.85 on Tuesday, just slightly below the record average of $3.99 recorded in June 2008. By Wednesday morning, some pump prices hit $4 a gallon and higher, said Gail Weinholzer, a spokeswoman for AAA Minnesota/Iowa. A lot of callers complained about having to shell out $4.19 a gallon, she said. The lowest price reported to her was $3.99; the highest was $4.30 in the west metro.

"There's a lot of shock, a lot of dismay and a certain amount of anger," Weinholzer said.

When it comes to the sporadic rise and fall of gas prices, motorists have every right to be miffed, said Michael Green, spokesman for the AAA's Fuel Gauge Report.

"People are very frustrated about … gas prices because it's something you see every single day. You're driving down the street and you see the prices change and they're completely outside your control. There's nothing you can do about it and the reasons seem very mysterious. … It's like a butterfly flaps its wings in China and the price of oil goes up and down."

Craig Miller, a 56-year-old 3M employee from Lake Elmo, was shocked but resigned as he pumped gas at $4.19 a gallon. "It's like putting gold in my tank. It costs more than milk, doesn't it? That's what I thought when I saw it," Miller said.

Green blamed higher prices of crude oil combined with the temporary shut down of a major refinery in Indiana and another in Illinois for dramatically pushing pump prices to record or near-record levels in the Upper Midwest. The two refineries, which are undergoing extensive maintenance, are expected to be running again by early to mid-June, he said.

For now, gas supplies in the Midwest are tight, driving prices beyond the $3.59 a gallon national average, which has risen since April as the price of a barrel of crude oil went from $87 to $96, Green said.

"We have to emphasize that gasoline is sold on a global market," he said. "People want to be mad at the gas station but the gas station is buying gas from the refinery, which is buying oil from an oil company and it all goes down the line. … Tensions with Iran, the economy in China, debt in Europe are all factors that determine the price of oil, and as a result, the price of gasoline.

"There is no other product where you go to the store and see this kind of price change every day," Green said. "If Starbucks changed the price of coffee every day based on the price of coffee beans, people would be pretty upset about that."

At a Marathon station in Maplewood, the $4.19-a-gallon price had some motorists shaking their heads and refusing to fill up. One couple bought lottery tickets instead.

In St. Paul, Ayodele Ojo, a local attorney, also decided not fill up his up his Mercedes SUV, stopping the pump when it hit $21. "What can we do? I mean, we can't travel on an empty tank. ... I'm hoping that tomorrow it will come down."

Making changes

The cost of gas has been in the $3 range for more than two years, said Green. And when the price suddenly hits $4 a gallon, there's little people can do to dramatically change their lives quickly, he said. "People still have to drive to work and they still have to take their kids to school," he said.

So they tweak their lives by dining out less, joining carpools, hopping on mass transit and delaying major purchases, Green said.

But few will give up their vacations, he said.

"People really value traveling, spending time with friends and family, going places," Green said. "The last thing you want to do is cancel a trip because gas prices are high. But people will find other ways to save."

Despite the $4.19-a-gallon price tag, Ron Spychalla, 41, of Oakdale, began pumping gas into his truck after pulling into the Marathon station in Maplewood.

"Geez, I wish we could stockpile it in barrels in our back yard," he said.

Staff writer Tim Harlow contributed to this report.

mlsmith@startribune.com • 612-673-4788 joy.powell@startribune.com • 617-673-7750