After crossing the 25,000-mark in early trade, the BSE Sensex retreated to end with a marginal rise of 23.53 points at a fresh record close of 24,716.88 today on massive profit-booking ahead of the swearing-in of Narendra Modi as PM.

The 30-share index surged 482 points to hit day's high of 25,175.22 boosted by power, PSU, capital goods, auto and realty sector stocks. In previous two sessions, it had rallied 395 points.

However, the index started losing momentum towards the close and briefly slipped into negative territory to touch a low of 24,433.90. It recovered marginally to end 23.53 points, or 0.10 per cent, higher at 24,716.88, surpassing its closing of 24,693.35 on Friday. Intra-day, it swung over 741 points.

BHEL, Tata Power and GAIL led the 18 losers in Sensex while M&M, Sesa Sterlite and Wipro were among the 12 gainers.

The 50-share NSE Nifty after regaining the key 7,500-mark to hit day's high of 7,504.00, succumbed to emergence of profit-booking at prevailing levels. It gave up all gain to close at 7,359.05, a fall of 8.05 points or 0.11 per cent.

Meanwhile the rupee, in the forex market, also turned weak and was trading 29 paise lower at 58.81 after strengthening to a 11-month high of 58.40 against US dollar.

Stock brokers said investors who were sitting gains became cautious and locked in gains in recent outperformers such as power, PSUs, realty, oil and gas and banking sector stocks. Sensex has gained over 2,200 points this month so far.

Modi, who will be sworn is as Prime Minister this evening, is likely to head a 45-member Union Council of Ministers including 24 with Cabinet rank.

Sectorally, the BSE Realty index suffered the most by falling 5.22 per cent, followed by Power index 2.94 per cent.

However, Auto index continued its upmove and ended 1.47 per cent, Capital Goods index (up 0.56 per cent) and IT index (up 1.46 per cent).

Sanjay Sachdev, Chairman, ZyFin Capital: The current market valuations are at 14x to 15x forward earnings vs. the LTA of 15.8x. Depending on the reform trajectory and macro recovery, we believe markets could sustain the positive momentum in long run. Sectors we believe have a positive outlook are Education, Infrastructure, E&C, Power and Housing Finance. With most expecting India's GDP to grow