Sensex and Nifty, the to key equity benchmarks, on Friday ended on a positive note, extending gains for a fourth straight week and marking the longest winning streak since January, as investors hope India's retail inflation data for July to ease.


Recovering from its early losses, the BSE Sensex ended 130 points (0.22 per cent) higher at 59,462 in a range-bound trade, while the broader NSE Nifty advanced 39 points (0.22 per cent) to close at 17,698.


A largely positive trend in global equities and foreign capital inflows also supported the domestic equity markets, traders said. However, IT and healthcare stocks remained a drag on the indices, they added. Brokers said investors picked up fundamentally strong stocks ahead of IIP (Index of Industrial Production) and Consumer Price Index (CPI) inflation numbers to be released after market hours on Friday.


On the 30-share BSE platform, NTPC was the top gainer, climbing 3.26 per cent, followed by Tata Steel, PowerGrid, ICICI Bank, Reliance Industries, SBI, and ITC. On the flip side, Infosys, Maruti, L&T, Tech Mahindra, Sun Pharma, and HUL were among the laggards, sliding as much as 1.56 per cent.


In the broader markets, the BSE MidCap and SmallCap indices closed 0.15 per cent and 0.4 per cent higher, respectively.


Sectorwise, Nifty IT and Pharma indices fell 1.15 per cent each, while the Nifty Oil and Gas index rose over 2 per cent.


In the previous session on Thursday, the BSE gauge ended 515 points (0.88 per cent) higher at 59,332, its highest closing since April 8, 2022. Likewise, the Nifty gained 124 points (124.25 per cent) to close at 17,659.


In Asian markets, bourses in Hong Kong, Tokyo, and Seoul ended with gains, while Shanghai closed in the red. Equities in Europe were trading higher in mid-session deals.


Foreign institutional investors (FIIs) were net buyers in the Indian capital market as they purchased shares worth Rs 2,298.08 crore on Thursday, according to exchange data.


The international oil benchmark Brent crude was trading 0.40 per cent higher at $100 per barrel. 


Meanwhile, the rupee depreciated 4 paise to close at 79.66 (provisional) against the US dollar on Friday, tracking a strong American currency in the overseas market and rising crude oil prices.


At the interbank foreign exchange market, the local currency opened at 79.67 and saw an intra-day high of 79.63 and a low of 79.72 against the American currency. It finally ended at 79.66, down 4 paise over its previous close.