The price of natural gas rose 17.3 cents to settle at $4.128 per 1,000 cubic feet on the New York Mercantile Exchange.
Earlier, the Energy Department said that the country's natural gas inventories grew by 73 billion cubic feet to about 1.83 trillion cubic feet for the week ended April 16. Analysts expected a bigger boost of between 76 billion and 80 billion cubic feet.
PFGBest analyst Phil Flynn said the news caught the market by surprise.
With recent mild weather and rising rig counts, "there was an expectation that we'd see more production, less demand and a bigger than expected increase in inventory," he said.
Flynn suggested that stronger manufacturing figures could have helped boost demand for natural gas and production may not have been as high as the rig count indicated.
"Traders got too bearish too soon," he said.
Meanwhile, oil prices tumbled as the stock market lost ground, then recovered to settle pennies higher as the Dow Jones Industrial Average and S&P 500 pared earlier losses. By mid-afternoon the Dow was down about 23 points and the S&P 500 was off about a point.
Benchmark crude for June delivery rose 2 cents to settle at 83.70 a barrel on the New York Mercantile Exchange. The price of crude is 80 percent higher than a year ago. The increase seems to be tracking the dollar and the direction of stocks on Wall Street, not U.S. energy demand.
Meanwhile, the debt crisis in Greece continues to dampen expectations for an economic recovery and stronger energy demand, Flynn added. Greece's mounting problems are also weighing on the euro, bolstering the dollar and hurting oil prices. A stronger dollar makes crude more expensive for holders of other currencies.
In other Nymex trading in May contracts, heating oil rose 0.92 cent to settle at $2.215 a gallon and gasoline added 1.75 cents to close at $2.3002 a gallon.
In London, Brent crude edged down 3 cents to settle at $85.67 on the ICE Futures exchange.
Associated Press writers Pablo Gorondi in Budapest, Hungary and Eileen Ng in Kuala Lumpur, Malaysia, contributed to this report.