Traders piled into a frothy rally in the natural gas markets Tuesday, sending the price of the energy commodity to 2012 highs and seemingly hoping to turn a quick profit with a highly volatile trade before the market's momentum shifts.

Natural gas futures, which had reached levels so low back in April that they made extraction unprofitable for most producers, reached a 2012 high of $3.166 per million British thermal units during trading in the New York Mercantile Exchange Tuesday. Those futures were going for $3.134, up 0.8 percent from the previous day's settlement price, in mid-afternoon trading. Tuesday's price momentum came after a massive run-up from mid-June, when gas futures traded below $2.25 during several sessions. The rally has intensified over the past two weeks, with prices coming up more than 14 percent from levels near $2.75 just 6 sessions ago.

Investors have gone into a buying frenzy on both technical and fundamental cues. Bullish bets on commodity futures for natural gas increased by 6.4 percent in the seven days ended July 17, the latest period for which data is available, according to a weekly report by the Commodity Futures Trading Commission. Those going long on natural gas have been heartened by several factors, including the fact the supply overhang that kept prices down earlier in the year has been reduced as drilling rigs have gone offline. U.S. consumers have also cranked up their air conditioners in the midst of a very hot summer, raising demand from utilities.

The weather remains very hot, and the inventory overhang is being depleted, Jason Schenker, the president of Prestige Economics in Austin, Texas, told Bloomberg last week. Things are looking less bearish for gas than they did a few months ago.

Prices above $3 for natural gas futures are a far cry from just a few months ago. On April 19, futures hit a 10-year nadir of $1.902, amid what was considered a massive supply glut. The rise in gas prices also stands in contrast to the momentum in other energy commodity products, including futures for gasoline and heating oil, which have recently plummeted.

Some market-makers seemed to be expecting the rally to last at least a bit more.

It doesn't look like we've really peaked yet, McGillian, a broker and analyst at Tradition Energy, told the Wall Street Journal Tuesday.

However, McGillian and other analysts have warned the market could quickly turned against bullish speculators if gas futures increase further, as utilities might decide to switch from burning natural gas to using coal given the right price incentives. That would be a reversal of the pattern seen throughout the year.

In fact, Morgan Stanley analysts Hussein Allidina and Tai Liu called the top on the natural gas rally Tuesday, stating in a note to clients that ongoing dependence on coal-to-gas switching limits upside from weather as peak energy consumption was likely behind us.