The blue-chip NSE Nifty 50 index ended 0.17% higher at 17,853.2, and the S&P BSE Sensex rose 0.27% to 60,048.47. Both indexes hit record highs earlier in the session.

It took the Sensex just 166 sessions to gain its latest 10,000 points, compared with the 414 sessions it took to cover the previous 10,000.

The pace of gains "shows the impact of return of FPIs (foreign portfolio investments) and local investors continuing to invest despite headwinds that cropped up time and again," said Dhiraj Relli, managing director and chief executive at HDFC Securities.

Each 10,000 milestone represents a smaller proportional gain for the Sensex. The index, which dates to 1986, first touched the 10,000 mark in 2006.

"We believe that the interest of foreign investors in Indian markets will sustain due to continued policy support from the government and accelerated pace of vaccination," said Hemant Kanawala, head of equity at Kotak Mahindra Life Insurance.

Indian shares registered their fifth straight weekly gain, with both major indexes rising over 1%.

On Friday, tech stocks jumped as much as 2.7% to hit a record high, with HCL Technologies surging over 2% to be among the top gainers on the Nifty 50.

Sentiment was also buoyed after U.S. peers Accenture and Salesforce came out with robust forecasts to help bolster gains on Wall Street overnight.

Metal stocks fell over 2% to snap three straight sessions of gains, with Tata Steel dropping over 3% to be among the biggest losers on the Nifty 50.

Meanwhile, the subindex for media stocks advanced over 11% for the week, and real estate stocks surged over 20% for the week.

(Reporting by Soumyajit Saha in Bengaluru, additional reporting by Gaurav Dogra; Editing by Maju Samuel)

By Soumyajit Saha