The benchmark indices snapped three sessions long losing streak to end higher with energy shares leading the gains while financial and auto shares bounced back.
Positive trade in Asian markets just before a vote in the US Congress on US President Donald Trump's GOP healthcare bill also contributed to the gains.
The S&P BSE Sensex ended at 29,332, up 164 points, while the broader Nifty50 settled at 9,086, up 56 points.
The broader market outperformed with S&P BSE Midcap index and S&P BSE Smallcap index gaining nearly 1% each.
The market breadth, indicating the overall health of the market was