NEW YORK (Dow Jones)--Oil futures advanced Tuesday as the stock market rallied and traders placed new bets on higher prices following Monday's steep decline.

Light, sweet crude for July delivery settled up $2.07, or 2.1%, to $99.37 a barrel on the New York Mercantile Exchange. Brent crude on the ICE futures exchange settled up $1.06, or 0.9%, to $120.16 a barrel.

The gap between the two major benchmarks hit a fresh record in intraday trading, though it had narrowed by the close after a midday rally of the Nymex contract. The differential settled at $20.79 a barrel.

The two contracts have historically traded within $1 of each other. But the divergence has soared to record levels recently, with the Nymex West Texas Intermediate contract pressured by high U.S. oil inventories and the Brent contract plagued by concerns about tightening supplies and resurgent unrest in Nigeria.

On Tuesday, however, WTI outpaced the Brent contract, aided by a 1.5% rally in the Standard & Poor's 500-stock index and a better-than-expected reading on May U.S. retail sales.

"You're seeing some return of risk appetite--equities are up sharply," said Matt Zeman, chief market strategist at Kingsview Financial in Chicago.

In addition, traders said WTI's decline of 2% Monday appeared overdone, and a failure to extend that decline into Tuesday prompted market participants to place new bets on higher prices.

"[Monday's] selloff was probably a little bit too much and we're getting some of it back," said Peter Donovan, vice president at Vantage Trading in New York.

Brent crude also traded higher a day after Royal Dutch Shell declared force majeure on its Nigerian Bonny Light crude after fires and pipeline leaks blamed on sabotage. The term is used when a company believes conditions beyond its control make it impossible to fulfill a contract.

The leaks affected the 150,000-barrel-a-day Trans-Niger Pipeline, the company said. The leaks have been repaired and flows have resumed, but production deferrals forced it to revise June and July loading programs.

Later Tuesday, traders will turn their attention to the first of two reports on U.S. inventory levels. The American Petroleum Institute, an industry group, will publish its survey of U.S. stock levels at 4:30 p.m. EDT. The Department of Energy is due to release its more closely watched survey Wednesday at 10:30 a.m. EDT.

Analysts surveyed by Dow Jones Newswires expect the surveys to show oil stocks last week fell, on average, 500,000 barrels. Gasoline stocks are seen rising 400,000 barrels, while inventories of distillates, including heating oil and diesel, are forecast to climb 900,000 barrels.

Front-month July reformulated gasoline blendstock, or RBOB, settled up 6.78 cents, or 2.3%, to $3.0646 a gallon. July heating oil rose 2 cents, or 0.6%, to $3.1258 a gallon.