Mumbai: Erasing initial gains, the Bombay Stock Exchange benchmark Sensex on Friday ended flat as funds indulged in profit booking at existing higher levels amid a firming global trend.

The 30-share index, which had gained over 245 points in early trade, closed down by 3.31 points at 18,486.45 points. The barometer had gained over 865 points in the last four trading sessions.

The broad-based National Stock Exchange index Nifty closed moderately higher by 2.55 points at 5,538.75, after touching the day's high of 5,608.20.

While capital goods, PSU, metal, FMCG and consumer durable stocks declined, banking, auto, IT, realty, power and teck stocks posted gains on interested buying.

However, gains by the two heaviest, Reliance Industries and Infosys Technologies, cushioned market from any major fall.

A firming trend in Asian markets and a higher opening in Europe also saved the market from any major fall.