The Sensex ended with a gain of 5 points at 26,402 while the NSE Nifty closed 6 points higher at 8,094.
Top Senex gainers were Dr Reddy's (2.87 percent), SBI (2.77 percent), Sun Pharma (2.67 percent), Cipla (2.62 percent) and Larsen & Toubro (2.36 percent). The Nifty 50 gainers included Bank of Baroda and Aurobindo Pharma.
Foreign institutional investors (FIIs/FPIs) were net sellers of Indian equities worth Rs. 146 crore.
The Sensex continues to swing â€” from early losses to gains â€” and now trading almost flat at around 2.27 p.m. The NSE Nifty was up 5 points at 8,093.
The top Sensex gainers were SBI, L&T, ITC and Sun Pharma.
The markets seem to be ignoring a 2,000-point downgrade by brokerage Duetsche Bank, from 29,000 to 27,000.
"As the long and complicated process of political and economic separation of the UK from the EU unfolds, financial market volatility will remain elevated," CNBC-TV18 reported, citing a note by Deutsche Bank.
The brokerage said that stocks such as Titan, Lupin, NTPC, Hero Motocorp, BPCL, HPCL and UltraTech Cement that are "insulated" would not be impacted much by Brexit.
The Sensex rebound by about 80 points at around 12.50 p.m. after opening on a weak note, tracking mixed clues from Asian equities. The 30-scrip benchmark index had lost about 100 points from Friday's close when markets opened but reversed to trade with gains later.
The Sensex rally was being led by the State Bank of India (up 2.3 percent), Larsen & Toubro (up 1.96 percent) and ITC (up 1.80 percent). Other index gainers included ICICI Bank, Adani Ports and Sun Pharma.
Top Sensex losers included TCS, Infosys, Wipro and Power Grid Corporation. The BSE Information Technology index was down 1.39 percent.
The 50-scrip NSE Nifty was up 29 points at 8,117 with pharma stocks trading with gains of 0.50 percent to 3 percent. Aurobindo Pharma was the biggest sectoral gainer at Rs. 722.85 (up 3.13 percent).
The rupee extended its Friday and opened 12 paise down to 68.08 to the US dollar. "The intra-day range is seen between 67.75-68.30 levels," IFA Global said in a note on Monday.
Story republished at 6.20 p.m. with additional details.