The BSE Sensex breached the 40,000-mark for the first time in four months on Wednesday, closing 220.03 points higher at 40,051.87. This is the third-highest closing mark for the Sensex ever, Mint reported. The rally in the Sensex was the result of better-than-expected earnings of some companies listed on the index.

The National Stock Exchange Nifty, meanwhile, rose 57.25 points to close at 11,844.10.

The top gainers on the Sensex on Wednesday were State Bank of India, Tata Consultancy Services, ITC, Bharti Airtel and Sun Pharmaceuticals. The top losers were Yes Bank, Maruti Suzuki, Coal India, IndusInd Bank and ICICI Bank.

The stocks that gained the most on the Nifty were GAIL, State Bank of India, Grasim, Tata Consultancy Services and ITC. The biggest losers were Bharti Infratel, Yes Bank, Maruti Suzuki, Britannia and UPL.

The Indian rupee was trading six paise lower at 70.89 against the United States dollar at 4.42 pm.