The blue-chip Nifty 50 index ended up 0.1% at 13,760.55, while the benchmark Sensex gained 0.15% to 46,960.69. For the week, the indexes gained 1.8% and 1.9%, respectively.

As the end of the year nears, global markets have been swinging between broader optimism about COVID-19 vaccines and a global economic recovery and concerns about still rising infections.

However, Indian markets have mostly outperformed other Asian markets this year, boosted by record inflows from foreign institutional investors (FIIs), vaccine progress globally and signs of a nascent economic recovery in the country.

Nifty IT index rose 1.6%, while the heavyweight Nifty Bank Index fell 0.4%.

Strong results from global IT services provider Accenture Plc boosted the sentiment for Indian IT stocks, said Neeraj Dhawan, director at Quantum Securities in New Delhi.

Accenture raised its full-year sales forecast and beat quarterly revenue estimates on Thursday.

"Markets are in a sweet spot right now and even small corrections will be bought," Dhawan said.

Infosys Ltd was the top boost to the Nifty 50 index, gaining 2.6%, private-sector lender HDFC Bank was the top drag, falling 2.1%.

(Reporting by Nallur Sethuraman in Bengaluru; Editing by Rashmi Aich)