U.S. natural gas futures turned positive and rose to a 31-month high on Tuesday on forecasts for hotter weather and higher air conditioning demand over the next two weeks than previously expected.

Earlier in the session, gas futures were trading lower on expectations high prices would cause power generators to burn more coal and less gas to produce electricity.

Front-month gas futures were up 5.2 cents, or 1.4%, to $3.831 per million British thermal units (mmBtu) at 8:45 a.m. EDT (1245 GMT), putting the contract on track for its highest price since December 2018 for a second day in a row.

Rising gas prices in recent weeks and the sharp nearly 8% drop in U.S. crude futures on Monday helped push the premium of oil over gas to its lowest since December 2020. Over the past several years, that premium prompted U.S. energy firms to focus most of their drilling on finding more oil instead of gas because crude was the more valuable commodity.

The oil-to-gas ratio, or the level at which oil trades compared with gas, fell to 18-to-1 on Monday, which is below the 22 times oil has traded over gas so far in 2021. That compares with crude's average premium of 19 times over gas in 2020 and a five-year average (2015-2019) of 20 times over gas. Crude, however, remains more valuable than gas. On an energy equivalent basis, oil should trade only six times over gas.

Data provider Refinitiv said U.S. output in the Lower 48 states slipped to 91.4 billion cubic feet per day (bcfd) so far in July, due mostly to pipeline problems in West Virginia earlier in the month. That compares with an average of 92.2 bcfd in June and an all-time high of 95.4 bcfd in November 2019. 

Refinitiv projected average gas demand, including exports, would rise from 91.9 bcfd this week to 94.5 bcfd next week as the weather turns seasonally hotter. Those forecasts were lower than Refinitiv predicted on Monday.

The amount of gas flowing to U.S. liquefied natural gas (LNG) export plants has averaged 10.8 bcfd so far in July, up from 10.1 bcfd in June but still below the record 11.5 bcfd in April.

With European and Asian gas trading near $12 and $14 per mmBtu, respectively, analysts said buyers around the world would keep purchasing all the LNG the United States can produce.

U.S. pipeline exports to Mexico, meanwhile, have averaged 6.5 bcfd so far in July, down from a record 6.8 bcfd in June.

(Reporting by Scott DiSavino; Editing by Chizu Nomiyama and Paul Simao) ((scott.disavino@thomsonreuters.com; +1 332 219 1922; Reuters Messaging: scott.disavino.thomsonreuters.com@reuters.net))