The benchmark indices ended higher for the sixth straight session on Wednesday, with Sensex rising more than 200 points and Nifty just over 42 points.
At close, Sensex ended 214.17 points or 0.37 per cent up at 58,350.53, while Nifty was up 42.70 points or 0.29 per cent at 17,388.15.
The IT Index ended with a gain of 1.3 per cent, with Tech Mahindra, Infosys and TCS being the major contributors to the surge.
Tech Mahindra, TCS, Infosys and Asian Paints were among the major gainers in Nifty on Wednesday. About 1,370 shares advanced, 1,975 shares declined while 139 shares remained unchanged on Wednesday.
The BSE Mid-cap Index fell 0.6 per cent, while the Small-cap Index was down 0.28 per cent.
"Bulls and bears slugged it out in a volatile charged session, but eventually the former maintained their winning streak on Dalal Street on buying in IT and select finance stocks. Even as FII buying into local equities has resumed after a gap of three months, traders are taking a stock-specific approach ahead of the RBI's policy decision on Friday," said Shrikant Chouhan, Head of Equity Research (Retail) at Kotak Securities Ltd.
Nifty opened lower and witnessed volatility on account of weak global cues and ahead of weekly expiry. However, the index recovered in the last hour of the session.
Tensions surrounding Taiwan was shrugged off by the global as well as Indian markets which ended higher on Wednesday. Strong momentum in the market over the last few days has helped pull up Nifty by more than 1,000 points in the last six trading sessions.
"Strong macro data, positive FII flows, steady earnings and healthy progress in monsoon have been some of the key factors supporting the market. In the near term, it could be a tug-of-war between domestic and global factors which could determine the market direction," said Siddhartha Khemka, Head of Retail Research at Motilal Oswal Financial Services Ltd.
The Shanghai Composite Index was down 0.7 per cent to 3,163.67 points, and the Chinese stocks also traded lower. Tokyo stocks ended up on Wednesday. The benchmark Nikkei 225 Index added 0.53 per cent while the Topix Index rose 0.27 per cent.
Amid US-China tensions, European stocks began the day on a negative note.