The benchmark indices failed to hold on to their early gains and snapped a four-session winning streak to end marginally lower in a volatile trading session on July 8.

Tracking mixed global cues, the market opened on a firm note and extended gains during the first half of the session. However, profit booking in the latter half wiped out all the intraday gains, dragging the benchmarks into negative territory by the close.

At close, the Sensex was down 104.35 points or 0.13 percent at 78,180.72, and the Nifty was down 31.65 points or 0.13 percent at 24,398.70.

The broader indices underperformed the main indices with Nifty Midcap 100 falling 0.4 percent and Nifty Smallcap 100 index declining 0.55 percent.

Infosys, Tech Mahindra, HCL Technologies, Titan Company, SBI Life Insurance were among major gainers on the Nifty, while losers were Trent, Adani Enterprises, Bharat Electronics, Adani Ports and Cipla.

Sectoral indices ended mostly lower with Nifty IT emerged as the top sectoral gainer, rising 2.4 percent, followed by Nifty Consumer Durables, which gained 0.9 percent. On the downside, Nifty Realty was the biggest loser, falling 1.5 percent. Nifty Metal declined 1 percent, while Nifty Energy, Nifty Pharma and Nifty Media slipped 0.7 percent each.

More than 140 stocks touched their 52-week high on the BSE, including Titan Company, IndusInd Bank, Gland Pharma, GMR Airports, JB Chemicals & Pharmaceuticals, Adani Energy Solutions, Granules India, Torrent Pharmaceuticals, Zydus Lifesciences, Cholamandalam Investment & Finance, Radico Khaitan, Lupin, Sona BLW Precision Forgings, Grasim Industries, Delhivery, Apollo Hospitals Enterprise, L&T Finance, Cemindia Projects, Schneider Electric Infrastructure and Phoenix Mills, among others. Click to View More

Among individual stocks, Titan gained 2 percent after reporting robust June-quarter business growth across key segments. South West Pinnacle Exploration advanced 1 percent after securing a contract from Reliance Industries in Madhya Pradesh. JB Chemicals & Pharmaceuticals and Torrent Pharmaceuticals ended with marginal gains after the National Company Law Tribunal (NCLT) approved their merger. RITES surged 8 percent after bagging a $35.8 million locomotive supply order from South Africa.

On the downside, Varun Beverages slipped 2 percent after its Kenyan subsidiary agreed to acquire the beverage business of Devyani Food Industries. Samvardhana Motherson International declined 1.5 percent after around 38.7 million shares changed hands in a block deal, while Trent tumbled 12 percent following its June-quarter business update.

The Indian rupee strengthened by 43 paise to settle at 94.97 against the US dollar on Tuesday, compared with its previous close of 95.40.