* Europe erases gains, closes lower as energy weighs
* Oil hits 12-day high, turns negative on output deal
* Wall Street gains as financials, consumer discretionary lead (Adds close of European markets)
By Chuck Mikolajczak
NEW YORK, Feb 16 (Reuters) - Global equity markets rose on Tuesday as investors engaged in bargain hunting, even as oil prices relinquished early gains and turned lower after an agreement among top producers to freeze output faced obstacles for completion.
After an extended holiday weekend, Wall Street was led higher by gains in financial .SPSY and consumer discretionary stocks .SPLRCD , with both up more than 2 percent on the session after being among the worst performing S&P sectors for the year. oil exporters Russia and Saudi Arabia agreed to freeze output levels but said the deal was contingent on other producers joining in, a major sticking point with Iran absent from the talks and determined to raise production. uncertainty around the negotiations dented expectations for a supply cut and sent oil tumbling off its highs. Brent crude LCOc1 was last down 3.3 percent at $32.28 after hitting a 12-day high of $35.55 a barrel. U.S. crude CLc1 was off 1.5 percent at $28.99 after touching a high of $31.53. climbing as much as 1.1 percent, the S&P energy sector .SPNY was last up 0.5 percent.
After closing at its lowest level since February 2014 on Thursday, the S&P 500 was on track for its best two-day performance in six months.
"Friday we had a strong rally, so in come the short covers, the bargain hunters, the ones hoping that oil has bottomed," said Andre Bakhos, managing director at Janlyn Capital LLC in Bernardsville, New Jersey.
"The question for market participants now is what is going to keep attracting buyers."
The Dow Jones industrial average .DJI rose 193.94 points, or 1.21 percent, to 16,167.78, the S&P 500 .SPX gained 26.55 points, or 1.42 percent, to 1,891.33 and the Nasdaq Composite .IXIC added 85.85 points, or 1.98 percent, to 4,423.36.
The MSCI World equity index .MIWD00000PUS was up 0.87 percent.
Shares in Europe lost ground after a 6 percent rally in the prior two sessions as oil faded, with the pan-European FTSEurofirst 300 stocks index .FTEU3 closing down 0.43 percent. The STOXX Europe 600 basic resources index .SXPP fell 0.8 percent after rising as much as 3 percent in earlier trading. yen JPY= strengthened against the dollar to 113.90 following the oil announcement, which dented risk appetite. It remained well off a 15-month high of 111.99 yen per dollar hit last week, when investors piled into the yen as a safe haven and expectations faded that the Federal Reserve would raise interest rates this year.
The dollar .DXY rose 1 percent against a basket of major currencies while the euro EUR= edged lower at $1.113, down from last week's four-month high of $1.1377. U.S. Treasury notes US10YT=RR lost 13/32 in price to yield 1.7896 percent, lifting benchmark yields further from their near 3-1/2-year lows set last week. XAU= , which had its best week in four years last week, edged down 0.28 percent at $1,214.66 after rising as high as $1,216.80 as gains in U.S. equities eased demand for the yellow metal. CMCU3 edged down 0.24 percent at $4,551 a tonne.