At close, the Sensex was down 346.89 points or 0.55% at 62,622.24, and the Nifty was down 99.40 points or 0.53% at 18,534.40, as traders preferred to take home some gains following the four-day rally ahead of the key vote on the US debt ceiling in the House of Representative later tonight. The top gainers on Nifty 50 were Tech Mahindra, Bharti Airtel, Kotak Bank, SBI Life, and Sun Pharma while the losers were ONGC, NTPC, Axis Bank, Reliance Industries Ltd (RIL), and HDFC. About 1679 shares advanced, 1733 shares declined, and 133 shares were unchanged. In the broader markets, the BSE Midcap and Smallcap indices bucked the trend and finished with gains in excess of 0.5 percent each. In sectoral indices, Bank Nifty tanked 308.20 points or 0.69% to 44,128.15, Nifty Metal plunged 46.50 points or 0.78% to 5,890.05 and Nifty Oil & Gas tumbled 94.75 points or 1.26% to 7,432.15 while Nifty Pharma rose 73.70 points or 0.58% to 12,678.40 and Nifty Realty jumped 3.60 points or 0.76% to 478.80.