The BSE benchmark Sensex on Friday erased early losses to close 35 points higher at 21,809.80 on fag-end value buying in select, blue-chip stocks available at attractive levels, amid WPI inflation easing to nine-month low of 4.68% in February.
Asian and European indices were weak as investor fears that China is entering a deeper slowdown were heightened after data showed Chinese industrial production and retail sales grew slower than analysts expected.
A referendum in Crimea over its bid to break away from Ukraine and join Russia also added to investory jittery.
"The Indian benchmark indices were seen inching lower and maintained that bias as the day progressed. In fact, the announcement of WPI data ... failed to trigger any positivity in domestic bourses," said Jayant Manglik, President, Retail Distribution, Religare Securities.
However, a sudden buying in the last hour helped the Sensex close the day highet, he added.
The 30-share BSE barometer resumed 144 points lower in line with weakness in Asian stocks. It declined further to a low of 21,573.48, down by over 200 points.
But a sudden emergence of fag-end value buying in select, blue-chip scrips pushed the Sensex up to 21,809.80, a gain of 35.19 points or 0.16%.
On Thursday, it had closed by 81.61 points lower.
The NSE 50-issue CNX Nifty also added 11.10 points or 0.17 pct to end at 6,504.20.
Major gainers were BHEL 2.54 at%, L&T 2.46%, Dr Reddy's Lab 1.53%, Cipla 1.47%, Tata Steel 1.47%, Sun Pharma 1.42% and Tata Motors 1.37%
Wipro fell by 2.90%, Bharti Airtel 1.93%, Axis Bank 1.80%, HDFC Bank 1.42%, HDFC 1.41% and HUL 1.10%.
"Markets reversed the trend and ended with marginal gains. For the week, benchmark indices closed largely unchanged.
"Going ahead, the referendum in Ukraine will be the immediate event to watch out for. The RBI policy meeting will be watched for cues on future interest rate movements," said Dipen Shah, Head, Private Client Group Research, Kotak Securities.
Foreign institutional investors bought shares worth a net Rs 616.62 crores on Thursday, as per provisional data from the stock exchanges.
Jignesh Chaudhary, head of research, Veracity Broking Services said: "Indian equity markets started the day on a weak note as tension in Ukraine ahead of a weekend referendum forced investors to exit from the riskier markets.
"But as the day progressed WPI data was out and wholesale price-based inflation eased to a nine-month low in February, raising hopes that the RBI would leave interest rates unchanged at its policy review next month.."
Of the 30 Sensex stocks, 15 ended higher, 14 declined and Tata Power ruled steady.
Among sectoral indices, consumer goods was up by 1.85%, followed by Realty 1.00%, Auto 0.94% and healthcare 0.81%, while Bankex fell by 0.68% and Teck 0.56%.
Total market breadth remained negative as 1,550 stocks ended in the red, while 1,207 concluded in the green. Total turnover dropped to Rs 2,252.51 crore from Rs 2,718.68 crore on Thursday.
Asian stocks closed down led by Japanese stocks on concern over China's economy faltering. Key indices in China, South Korea, Taiwan, Hong Kong, Japan and Singapore ended weak between 0.25% and 3.30%.
European markets too were trading lower in their late morning deals. The CAC was down by 0.58%, the DAX by 0.42% and the FTSE by 0.25%.