The NSE Nifty, which dipped below the key 10,800-mark to touch a low of 10,755.40, bounced back on late buying to close at 10,817.70, up 9.65 points, or 0.09 per cent.
The BSE Sensex ended with modest gains on Friday, helped by a late burst of buying in technology and pharma stocks, even as global sentiment took a hit after the US slapped fresh tariffs on Chinese imports.
Index heavyweight TCS spurted 2.75 per cent after the company's board approved a Rs 16,000-crore share buyback plan.
Global cues were grim as US President Donald Trump approved levying of new tariffs worth $50 billion on Chinese exports, while Beijing vowed to quickly retaliate.
European shares were mixed after the European Central Bank (ECB) said it would phase out some of its easy-money policies, but held back on a rate hike.
The 30-share Sensex, after succumbing to a broad sell-off in afternoon trade, managed to close 22.32 points or 0.06 per cent higher at 35,622.14 on fag-end buying in IT and pharma counters.
The NSE Nifty, which dipped below the key 10,800-mark to touch a low of 10,755.40, bounced back on late buying to close at 10,817.70, up 9.65 points, or 0.09 per cent.
The benchmarks finished with gains for the fourth week in a row.
The Sensex advanced 178.47 points, or 0.50 per cent while the Nifty climbed 50.05 points or 0.46 per cent.
Meanwhile, domestic institutional investors (DIIs) bought shares worth a net Rs 576.19 crore, while foreign portfolio investors (FPIs) sold equities worth Rs 1,372.84 crore yesterday, as per provisional data.
"Market was range-bound following the US decision to impose trade tariffs against China which is signalling re-emergence of trade war.
“The global market remained mixed as ECB outlined plans to taper the stimulus programs but took a conservative view on interest rate hike.
"Positive cues on IT index and improving focus on pharma stocks due to valuation and depreciating rupee lifted the market to end on a positive note," said Vinod Nair, head of research, Geojit Financial Services.
Among the Sensex components, Dr Reddy's topped the gainers list by surging 3.65 per cent after the company received final approval from the US health regulator for generic version of Suboxone, prescribed for opioid addiction.
Other counters that ended higher were Infosys, Sun Pharma, HUL, Kotak Bank, Bharti Airtel, Hero MotoCorp and Wipro, rising by up to 2.04 per cent.
Yes Bank took the biggest blow, plunging 1.91 per cent, while Axis Bank slumped 0.71 per cent after Fitch rating revised its outlook to negative from stable.
SBI, ONGC, Coal India, NTPC, M&M, L&T, ITC Ltd, ICICI Bank, Tata Motors, Adani Ports, Tata Steel and Bajaj Auto also finished lower.
Among the sectoral indices, IT index gained the most by rising 2.24 per cent, followed by healthcare 1.88 per cent and teck 1.83 per cent.
On the other hand, PSU index lost 1.64 per cent, metal 1.53 per cent, infrastructure 1.19 per cent, realty 1.17 per cent, power 1.10 per cent, oil and gas 1.08 per cent, capital goods 1.04 per cent and bankex 0.65 per cent.
The broader markets too were under pressure.
The BSE small-cap index declined 0.46 per cent, while the mid-cap index lost 0.40 per cent.
In Asia, Japan's Nikkei rose 0.50 per cent, while Hong Kong's Hang Seng fell 0.43 per cent and Shanghai Composite Index shed 0.73 per cent.
In the Eurozone, Paris CAC 40 was up 0.30 per cent, while Frankfurt's DAX shed 0.10 per cent. London's FTSE also fell 0.69 per cent in late morning session.
Photograph: Danish Siddiqui/Reuters