Oil reversed direction again Tuesday, rising 2 percent as traders took their cues from the dollar and stock markets.
Crude oil is used to produce gasoline and other fuels, and it's also a major investment commodity. Prices can swing with the collective mood on Wall Street. Recently benchmark oil has fluctuated between $95 and $99 a barrel as investors gauge how Europe deals with Greece's debt crisis and the debate goes on in Washington over spending and the U.S. debt ceiling.
"Every day, we hear more about what governments are doing to get their sovereign debt under control," independent analyst Andrew Lipow said. "But you don't see results, and that leads some people to think we're headed in the wrong direction."
The dollar fell against other currencies on Tuesday, sending some investors to commodities like oil. Oil, which is traded in dollars, tends to rise as the dollar falls and makes crude cheaper for investors holding foreign currency.
A broad stock market rally also helped push oil higher. The Dow Jones industrial average, the Nasdaq and the S&P 500 index all rose about 2 percent in afternoon trading.
Benchmark West Texas Intermediate crude for August delivery rose $1.57 to settle at $97.50 per barrel on the New York Mercantile Exchange. Brent crude, which is used to price many international oil varieties, gained $1.01 to settle at $117.06 per barrel on the ICE Futures exchange.
Some upbeat economic news supported higher oil on Tuesday as well. The Commerce Department said construction of new homes grew by 14.6 percent last month. Builders began work on a seasonally adjusted 629,000 homes in June. That's about half of what economists say is needed to sustain a healthy housing market. Still, analysts consider it a positive sign for the battered industry.
The housing market and the unemployment rate are key factors in the nation's economic recovery, which most view as sluggish at best right now. When more people head back to work and buy homes, oil and gas demand is expected to rise.
Gasoline pump prices rose less than a penny Tuesday to a national average $3.678 per gallon, according to AAA, Wright Express and Oil Price Information Service. A gallon of regular is about 31 cents cheaper than it was when prices peaked in early May. It's still almost 96 cents more than the same time last year.
MasterCard SpendingPulse reported that motorists continued to cut back on gasoline in the U.S. for the 17th consecutive week. Its weekly survey of credit card purchases estimates that Americans bought 1.1 percent less gas than the same period last year, based on a four-week average.
In other Nymex trading for August contracts, heating oil added 2.03 cents to settle at $3.098 per gallon, while gasoline futures gained 1.75 cents to settle at $3.1149 per gallon. Natural gas fell 1.3 cents to settle at $4.511 per 1,000 cubic feet.
Chris Kahn can be reached at www.twitter.com/ChrisKahnAP.