Updated from 2:58 p.m. EST

Energy prices had a back-and-forth session Wednesday, but in the end crude futures surged to extend the prior day's big rally.

The front-month contract for light, sweet crude added $1.17 to close at $58.14 a barrel on the Nymex, while heating oil was up a penny at $1.65 a gallon.

Natural gas was down 7 cents at $7.67 per million British thermal units, and gasoline shed 2 cents to $1.50 a gallon.

Inventories of crude oil grew to 325 million barrels at the end of last week, compared with 322 million a week before, the Energy Information Administration stated in its Weekly Petroleum Status Report. Stockpiles of gasoline were higher by nearly 4 million barrels at 225 million.

Although rising crude stores and climbing oil prices seem perplexing, they do give a revealing insight into market sentiment.

"This is what we call a 'behavioral tell,'" says Woody Dorsey, a behavioral market strategist at Market Semiotics in Vermont. He notes that when bearish news, such as the inventory report, hits the market, the bulls are immediately jumping in and bidding the price back up.

There is a "bullish predisposition," he says. "Oil is going a lot higher than anyone thinks."

Not everyone is so sanguine about the bull trend, with at least one observer seeing softer prices to come.

"The fundamentals are clearly bearish," says Brian Gibbons, an energy analyst at CreditSights in New York. He says prices could fall as stockpiles remain high and OPEC continues to have spare capacity. For its part, OPEC is saying it will cut production by 500,000 barrels a day starting in February in an effort to keep prices up.

Elsewhere, Algeria's oil minister Chakib Khelil indicated that the oil-producing organization is unlikely to introduce further cuts at its March meeting, Bloomberg reports.

Turning to the energy patch, Credit Suisse upgraded shares of Frontier Oil ( FTO) to a neutral rating from underperform, lifting the shares 2%.

A.G. Edwards boosted its stock price target for Valero GP Holdings ( VEH) to $27 a share from $24, sending the stock 1.6% higher at $24.78.

Among the majors, Exxon Mobil ( XOM) and BP ( BP) were fractionally lower.

The energy exchange-traded funds iPath Goldman Sachs Crude Oil ( OIL) and U.S. Oil ( USO) were up around 2% each.

More from Markets

Oil Slumps, Gas Spikes Ahead of Holiday Weekend; Assessing the Chipmakers--ICYMI

Oil Slumps, Gas Spikes Ahead of Holiday Weekend; Assessing the Chipmakers--ICYMI

Week Ahead: Wall Street Looks to Jobs Report as North Korea Meeting Less Certain

Week Ahead: Wall Street Looks to Jobs Report as North Korea Meeting Less Certain

Dow and S&P 500 Decline, Energy Shares Fall as U.S. Crude Oil Slides 4%

Dow and S&P 500 Decline, Energy Shares Fall as U.S. Crude Oil Slides 4%

Replay: Jim Cramer on the Markets, 10-Year Yield, Oil Prices and Foot Locker

Replay: Jim Cramer on the Markets, 10-Year Yield, Oil Prices and Foot Locker

Video: You Could Live in a Ritz-Carlton or St. Regis Home

Video: You Could Live in a Ritz-Carlton or St. Regis Home