The FII's bought shares worth Rs. 185 crore on Tuesday, extending their buying streak to a 13th consecutive day for a net of about $800 million.
The market was also helped by gains in other Asian markets as a semblance of calm returned after two days of intense volatility with the United States and Russia set to hold talks on easing tensions in Ukraine.
Hopes of a pre-election rally are also expected to help sentiment as shares usually rise a month before the polls begin. Polling will kick off on April 7 and go on until May 12, India's election commission said on Wednesday.
It is important to see how the markets progress ahead of elections as we have been struggling for sustainability at higher levels for quite some time. However, the situation is in favour of bulls this time so one should continue to uphold long positions and avoid contrarian approach.
The benchmark BSE Sensex rose 0.32 per cent, or 67.13 points, to end at 21,276.86, near its January 23 record closing high of 21,373.66.
Nifty gained 0.49 per cent, or 30.70 points, to end at 6,328.65, above the important 6,300 level.
Banks were among the leading gainers, with the NSE sub-index advancing 1.6 per cent, helped by hopes that data next week will show continued easing in inflation, allowing the central bank to keep interest rates on hold.
ICICI Bank rose 2.8 per cent and Axis Bank gained 1.1 per cent. Bank of Baroda surged 6.3 per cent while Punjab National Bank ended 4.6 per cent higher.
Among other interest rate-sensitive stocks, India's biggest realty developer DLF rose 3.5 per cent while non-banking finance lender, IDFC, gained 3.2 per cent.
Mahindra and Mahindra Financial Services rose 1.9 per cent after Goldman Sachs upgraded the stock to "buy" from "neutral", citing valuations and "overly pessimistic" market expectations on the non-banking financial firm's loan growth and profitability.
Bharti Infratel gained 5.9 per cent after the company entered into a tower sharing pact with Reliance Jio Infocomm, Reliance Industries' telecom unit. Reliance Communications fell 0.5 per cent after the Bharti Infratel and Reliance Jio Infocomm pact.
Astrazeneca Pharma India fell 5.3 per cent on profit-taking ahead of the company's board meet later in the day to consider a proposal by promoter AstraZeneca Pharmaceuticals AB (AZP AB) Sweden to delist the company.