Indian equity markets extended their rally for the second consecutive session on October 16, supported by buying in IT, media and metal stocks.

Despite weak global cues, the benchmark indices came under selling pressure in the initial hour of trade but gradually recovered as the session progressed. The Nifty climbed to an intraday high of 23,149.85 and ended the session near the day's high, reflecting sustained buying interest.

At close, the Sensex was up 413.66 points or 0.56 percent at 74,729.27, and the Nifty was up 148.80 points or 0.65 percent at 23,146.15.

Both the benchmark extended the gains for the second consecutive week, with BSE Sensex adding 3.1 percent and Nifty50 rising 2.7%.

The broader markets underperformed the benchmark indices, with the Nifty midcap and smallcap indices ended with marginal losses.

For the week, Nifty Midcap added 0.5 percent and Smallcap indices ended on flat note.

Top Nifty gainers were Tech Mahindra, TCS, Infosys, Bharti Airtel, M&M, while losers were Interglobe Aviation, BSE Limited, Max Healthcare, Tata Consumer, Jio Financial.

Except FMCG, oil & gas, Pharma, all other sectoral indices ended in the green with Information Technology, Metal, PSU Bank, Infra up 1-2 percent.

Among individual stocks, Vascon Engineers shares gained 10 percent after receiving a Letter of Acceptance for a Rs 198 crore project. Tech Mahindra shares surged 8 percent after reporting a 32.7 percent year-on-year jump in Q2 profit to Rs 1,585.6 crore, while Wipro shares rose more than 6 percent following its Q2 earnings announcement.

IIFL Finance shares up 2 percent after 103.7 percent year-on-year surge in Q2 profit, while Mankind Pharma shares declined 3 percent after the company announced plans to acquire a majority stake in Belgium-based Armed Cell Therapeutics B.V.

Among other stocks, Persistent Systems shares dropped 2 percent after reporting a 25.4 percent year-on-year decline in Q2 profit. Angel One shares fell 4 percent despite a 58.2 percent jump in quarterly profit. Meanwhile, Sri Lotus Developers rose 2 percent after reporting 77.9 percent year-on-year increase in consolidated Q2 profit.