Benchmark indices ended the day higher after trading in a tight range through the day even as European markets continued to slide, while Asian markets recovered lost ground.
Leading the set of gainers from the Nifty was Coal India, Bharti Airtel and Tata Power. Shares in Sun Pharma gained after reports that the company had hiked the prices of certain products.
Nifty stocks that added pressure on the Sensex were IT and Banking stocks like ICICI Bank and Tata Consultancy Services.
Other stocks that lost ground were Wipro and Hindalco. Shares in Nestle ended the day 3 per cent higher after reports that the Bombay High Court has allowed the company to export Maggi noodles.
Shares in BPCL hit a new lifetime high as crude oil prices continued to fall. Glenmark Pharma saw its shares rally more than 2 percent after the U.S. FDA approved a generic drug of the company.
Shares in Hindustan Unilever gained as investors took shelter in FMCG stocks ahead of the referendum vote in Greece.
Meanwhile, markets across Asia saw buying interest after Monday's huge selling pressure. The Shanghai Composite rallied a huge 5.5 per cent in trade, while the Hang Sang and the Japanese Nikkei both gained ground.
Shares in Europe continued to slide as Greece is set to default on a loan payment to the IMF due later today.