After rallying as much as 565 points during the day, the 30-share Sensex ended 396.22 points, or 1.03 per cent, higher at 38,989.74. The broader NSE Nifty soared 133.10 points, or 1.22 per cent, to end at 11,573.30.

According to traders, domestic investors followed cues from global markets that rallied after US President Donald Trump said a trade deal with China could happen sooner than expected.

In Asia, Hang Seng, Nikkei and Kospi ended significantly higher, while Shanghai Composite Index settled in the red. Stock exchanges in Europe were also trading significantly higher in their respective early sessions.

The market rose further as September futures and options expired, experts said, adding that investors were also optimistic ahead of the Reserve Bank's policy review meet next week.

On the currency front, the rupee appreciated 8 paise to 70.95 against the US dollar (intra-day). Brent crude futures inched up 0.26 per cent to USD 62.65 per barrel.