The market ended almost flat in a volatile trade but the benchmark index Nifty managed to hold on to the key 6,500-mark as investors adopted a cautious stand ahead of latest industrial and inflation numbers amid stock- specific action at the National Stock Exchange (NSE) today.

Investors resorted to profit-booking in banking, auto, and energy shares ahead of industrial output (IIP) and consumer price inflation (CPI) data which were released after market hours. FIIs, however, remained active in trade.

However, power equipment maker BHEL dropped 2.85 per cent and Tata Motors slid 2.29 per cent.

The market opened lower amid weak Asian stocks and traded in the red amid choppiness. It recovered in mid-morning on bouts of buying, but caution prevailed as investors booked profit, resulting in the benchmark index losing momentum and ending barely unchanged.

The 50-share Nifty hovered between a high of 6,546.15 points and a low of 6,487.30 points before closing at 6,516.90 points, up 5 points, or 0.08 per cent, over its last close.