The Nifty rose as much as 2.1 per cent to a record high, and the Sensex hit its record for a second consecutive session, as foreign investors bet big in a country that just months ago was gripped by market turmoil.
The Nifty's all-time high of 6,537.80 points, surpassed its previous high of 6,415.25 hit on December 9, although the Sensex got there first, hitting a record high on Thursday and again on Friday.
As in December, foreign investors are driving the rally, posting on Thursday their biggest daily purchases since December 19, or a net Rs 12.73 billion, to mark a 15th consecutive buying session.
The strong buying is confounding expectations that foreign investors would turn cautious ahead of general elections due to start on April 7 and conclude by mid-May.
Expectations that the opposition Bharatiya Janata Party, led by its prime ministerial candidate Narendra Modi, would win those elections are helping spark some of the gains, amid widespread perceptions it has a more business-friendly stance than the ruling Congress-led coalition.
But analysts say the rally could also signal a longer-term bet on a rebound in India's economy, given signs that foreign investors are switching from exporters, which had attracted the bulk of overseas buying last year, to domestic-focused sectors.
"One-way buying by overseas investors is supporting the gains. We expect sectors, which are connected to the core economy such as infrastructure, capital goods and metals are likely to see more buying interest," said Suresh Parmar, head of institutional equities at KJMC Capital Markets.
The Nifty ended up 2 per cent, or 125.50 points, posting its biggest daily percentage gain since November 25. The 50-member index rose nearly 4 per cent for the week.
The Sensex rose 1.9 per cent, or 405.92 points, after earlier setting a record high at 21,960.89 points. It rose 3.8 per cent for the week.
For the year, foreign investors have bought a net $850 million in shares, after buying $20 billion worth last year.
Overseas funds have also turned into strong buyers of debt, with net purchases of $4.9 billion so far this year, helping partly reverse their net sales of $8 billion in debt in 2013.
The strong buying is a stark turnaround from last year when India was struggling to contain a record-high current account deficit, sending the rupee to a record low of 68.85 to the dollar in late August.
However, strong curbs on gold imports imposed by the government, including a 10 per cent duty, has helped narrow the current account deficit, leading to a more stable currency.
The rupee reached up to 60.9450 to the dollar, its strongest level since December 9.
Betting on India
Domestic-focused shares were among Friday's top gainers, amid signs of increased foreign buying on rising expectations for the economy to rebound from its slowest growth in a decade this fiscal year.
Overseas holdings in shares of capital goods companies since mid-September rose 37.4 per cent to $12.78 billion by February 28, regulatory data shows, while overseas holdings in banks rose 10.9 per cent.
Biggest private sector lender ICICI Bank (ICBK.NS) surged 6 per cent, while State Bank of India rose 4.6 per cent.
Other rate-sensitive stocks rallied on expectations of a fall in inflation after the RBI raised interest rates aggressively since September. India's largest real estate developer, DLF Ltd (DLF.NS), jumped 9.7 per cent.
Larsen & Toubro Ltd, India's biggest engineering and construction firm, jumped 4.9 per cent.
But exporters fell, with Infosys Ltd losing 2.4 per cent and Sun Pharmaceutical Industries Ltd (SUN.NS) dropping 1.4 per cent, reversing last year's trend of foreign investors betting big on drugmakers and software services exporters.