The S&P BSE Sensex and NSE Nifty 50 Indexes snapped their two-day losing streak led by gains in Reliance Industries, HDFC, Axis Bank, ICICI Bank, HDFC Bank, ITC and State Bank of India. Earlier in the day, Sensex and Nifty opened lower amid volatility and swung over 10 times between gains and losses however buying in energy, oil & gas and metal shares helped the benchmarks snap their two-day losing streak. The Sensex surged as much as 545 points from day's lowest level and the broader Nifty 50 Index briefly climbed above 11,800.

The Sensex ended 0.8 per cent or 312 points higher at 39,435 and the NSE Nifty 50 Index surged 0.83 per cent or 97 points to close at 11,796.

Seventeen of 19 sector gauges compiled by BSE ended higher led by the S&P BSE Energy Index's 2.15 per cent gain.

Utilities, Metal, Oil & Gas, Power and Realty sector gauges also rose between 1 and 1.8 per cent each.

On the flipside, S&P BSE Capital Goods Index was top loser, down 0.2 per cent.

Mid- and small-cap shares underperformed their larger peers as the S&P BSE MidCap Index rose 0.66 per cent and S&P BSE SmallCap Index advanced 0.32 per cent.

JSW Steel was top gainer in the Nifty 50 basket of shares, the stock rose 3.2 per cent to Rs 266. Bharat Petroleum, Reliance Industries, Axis Bank, Tata Steel, Hindalco, NTPC, Indian Oil and Grasim Industries were also among the gainers.

On the flipside, Yes Bank, Bharti Infratel, Asian Paints, IndusInd Bank, Larsen & Toubro, UPL and Hindustan Unilever were among the losers.