The benchmark BSE Sensex surged nearly 300 points at the closing session as global stocks jumped after China's economic data prompted investors to anticipate more stimulus measures.
Value-buying in recently battered stocks of capital goods, infrastructure, banking and realty stocks too supported the uptrend.
The BSE Sensex ended higher by 291.47 points or 1.21 per cent at 24,479.84. It moved in a range of 24,563.34 and 24,247.23 after opening at 24,257.28
Similarly, the NSE Nifty ended higher by 84.1 points or 1.14 per cent at 7,435.10.
All BSE sectoral indices ended in the green. Among them, capital goods index gained the most by 2.85 per cent, followed by infrastructure 1.81 per cent, banking 1.68 per cent and realty 1.67 per cent.
Top five Sensex gainers were Adani Ports (+5.9%), Axis Bank (+5.23%), Tata Motors (+3.71%), L&T (+3.68%) and Bharti Airtel (+3.26%), while the major losers were M&M (-1.19%), Wipro (-1.02%), Coal India (-0.92%), Asian Paints (-0.63%) and Maruti (-0.61%).
"The markets had entered into the oversold region, that's why you're seeing buying in banks and in frontline stocks," said Alex Mathews, head of research at Geojit BNP Paribas.
Meanwhile, foreign portfolio investors sold shares worth Rs 1,203.84 crore yesterday, as per provisional data.
European equities bounced back from 13-month lows on Tuesday, with mining and energy stocks leading the market higher after the prices of major industrial metals and crude oil surged following the release of Chinese growth data.
Asian stocks gained as Shanghai stocks surged after data pointing to slower Chinese economic growth fanned stimulus hopes.
MSCI's broadest index of Asia-Pacific shares outside Japan was up 0.8 percent, rebounding from a four-year low touched earlier.
A report by Standard & Poor's Ratings said that sovereign rating trends in Asia-Pacific should stay mostly stable over the next year or two despite emerging market concerns.
The report added: "China appears to top the list of emerging market economic concerns. The Chinese economy is widely projected to decelerate further in 2016. Standard & Poor's forecasts growth slowing to 6.3% this year from an estimated 6.8% in 2015. But some investors also see the risk of a steeper decline in growth than what is projected."