NEW YORK ( TheStreet) -- Energy-related equities turned around late in Thursday's session on news that BP ( BP) stopped the flow of oil into the Gulf of Mexico.

BP shares finished Thursday's session nearly 8% higher when BP official Kent Wells reported dwindling oil flows as the company conducted its well integrity test. Although the oil's flow appeared to have stemmed, BP said it will take six to 48 hours of testing before it will definitely know whether the new cap has successfully stopped the flow of oil into the Gulf of Mexico. The stock was gaining 1.5% in after-hours trading.

The news gave a late boost to the energy sector, which had been one of the session's weakest sectors, on a day when disappointing regional manufacturing activity kept stocks in negative territory for most of the day's session. Stocks ended the day mixed, around the flat line.

The NYSE Arca Oil index advanced 1%, and the Philadelphia Oil Service Sector index rose 0.3% after both indices slumped throughout the session. Integrated oil companies finished broadly higher although Chevron ( CVX) and Hess ( HES) lost 0.1% and 0.5%, respectively. Exxon Mobil ( XOM), ConocoPhillips ( COP), and Anadarko Petroleum ( APC) gained 0.02%, 0.1% and 3.2%, respectively. In after-hours trading, however, Exxon and ConocoPhillips were down by 0.02% and 0.08%. Anadarko was adding 0.2%.

The August crude contract, which settled well ahead of the BP news, lost 42 cents, or 0.6%, at $76.62 a barrel. In late trading, the contract was down by 24 cents at $76.80 a barrel. The The U.S. Oil Fund ( USO) ETF weakened 0.2%, to close at $34.58 and was losing 0.03% in the after-hours session. The Oil Service HOLDRs ( OIH) ETF, however, rose 0.2%, to $103.70 and was gaining 0.3% in late trading.

Earlier, the Energy Information Administration said natural gas stocks in the lower 48 states rose by 78 billion cubic feet for the week ended July 9, which was on the low end of the analysts' projected range of 78 billion to 82 billion cubic feet, according to a Platts survey.

The net injection brought underground storage levels to 2.84 trillion cubic feet. That mark is 1.1% below levels seen a year ago, according to the report, though storage levels remain 10.7% above the five-year average.

The August natural gas contract on the Nymex gained 28 cents, or 6.5%, to settle at $4.59 per million British thermal units. Various news reports also attributed the rally to weather forecasts projecting hotter weather conditions ahead, thereby likely boosting demand. The contract had been trading in negative territory before the report, but climbed as high as $4.62 during the trading session, and the U.S. Natural Gas Fund ( UNG) exchange-traded fund gained 6.5%.

The Organization of the Petroleum Exporting Countries offered a demand forecast Thursday, predicting the world's appetite for crude will increase 1.2% in 2011, the Associated Press reported. The report said the increase will be led largely by demand from developing nations.

Elsewhere on the Nymex, August heating oil lost 2 cents, or 0.9%, to settle at $2.02 a gallon, and August gasoline shed a penny, or 0.3%, to settle at $2.07 a gallon.

--Written by Sung Moss and Melinda Peer in New York.