The gains were across the board following value buying by participants.
Brokers said covering-up of short positions ahead of the September derivatives expiry slated for tomorrow lent a hand.
Rate-sensitives such as banking and realty stocks took the recovery forward, underlined by renewed hopes of a rate cut by the Reserve Bank of India at its upcoming policy review later this month.
The 30-share Sensex ended at 25,822.99, a gain of 171.15 or 0.67 per cent.
Also Read
The gauge had lost 567.07 points in the previous two sessions after ADB lowered India's growth forecast and sell-off in Europe amid lingering growth concerns.
The 50-share NSE Nifty bounced back to hit a high of 7,882.90 on value-based buying in blue-chips and finally settled higher 33.95 points, or 0.43 per cent, at 7,845.95.
Despite the turnaround, sentiment remained fragile as other Asian markets stared at their biggest single-day fall in a month after a private survey showed China's factory activity shrank for the seventh straight month to its weakest level in 6-1/2 years.
Optimism in Europe and a gain in commodities spurred a rebound in the region after stocks saw their worst decline in a month, which too influenced mood here.
The big gainers were Lupin, Vedanta, HDFC Bank and M&M.
In the sectoral space, consumer durables gained the most surging 1.70 per cent, followed by banking, realty and oil & gas.
Of the 30 Sensex components, 19 advanced.
Foreign portfolio investors (FPIs) net sold shares worth Rs 1,052.24 crore yesterday, provisional data showed.
Most European indices ruled firm in early trade.