The Bombay Stock Exchange's benchmark index, the Sensex ended near 4-month high on Tuesday led by banks on hopes that improvement in net interest margins would boost first quarter earnings.
Meanwhile, the European markets were trading higher after the finance chiefs ratified a deal to rescue Spanish lenders.
The euro zone ministers agreed to grant Spain an extra year until 2014 to reach its deficit reduction targets and set the parameters of an aid package for Madrid's ailing banks.
But they made no apparent progress on how the bloc's new rescue fund, the ESM, will be used to intervene in bond markets. Following this news, CAC40, DAX and FTSE advanced 0.8-1 per cent each.
The Asian markets ended lower on Tuesday after Chinese import growth slowed sharply in June, underscoring weakness in domestic demand in the world's second-largest economy and adding to concerns about deteriorating global economic conditions.
The Shanghai Composite closed lower by 0.3 per cent at 2,164, Nikkei slipped 0.4 per cent and the Hang Seng closed lower by 0.2 per cent.
Back home, buying was visible across the board led by capital goods, banking, FMCG and auto stocks.
The BSE Bankex ended up 1.5 per cent. HDFC Bank, ICICI Bank, SBI and HDFC each gained between 1-1.5 per cent each.
The BSE capital goods index were among the top sectoral gainers, up 1.75 per cent each. The Capital goods index ended at 10,200, up 176 points led by L&T after it's wholly owned subsidiary, Tamco Switchgear,acquired Malaysia-based Henikwon Corporation.
The FMCG index also jumped 85 points to close at 4,966 levels led by buying in heavyweights such as ITC and Hindustan Unilever.
Auto stocks were in limelight today after the SIAM reported that car sales in the country grew 8.28 per cent to 1,55,763 units in June 2012 amid tough market conditions.
According to figures released by the Society of Indian Automobile Manufacturers (SIAM) today domestic car sales stood at 1,43,851 units in the same month last year. The BSE auto index jumped 1.6 per cent or 152 points to close at 9,533.
All the Sensex stocks ended higher in trades today. Hindalco was the top gainer among, up 3 per cent to close at Rs 128.
Maruti Suzuki jumped 2.7 per cent to end at Rs 1,221 after the company reported 23.1 per cent Y-o-Y jump in the June sales figures which came in at 57,653 units.
Tata Motors also rallied 2.6 per cent to Rs 258 after Ratan Tata, company's chairman said that the Tata Motors is turning to China to buy auto parts unavailable in India as it seeks to offer vehicles with automatic transmission at home.
ITC, Sterlite Industries, Jindal Steel, HDFC Bank, Hero MotoCorp, Gail India, Bharti Airtel, ICICI Bank, Bajaj Auto, HDFC, Dr Reddy's Labs, Reliance Industries, BHEL and Infosys also ended firm up 1-2.7 per cent each.
Shares of Anil Ambani group (ADAG) companies - Reliance Communications (RCom), Reliance Capital, Reliance Infrastructure and Reliance Power rallied in the range of 3-7 per cent on back of huge volumes.
Global Offshore Services moved higher by 8 per cent at Rs 80.95 after the company said its wholly owned subsidiary Global Offshore Services B. V. has raised $13.87 million (approx Rs 78 crore) via equity sale.
Globus Spirits soared 13 per cent to Rs 133, extending its past two days' rally on the back of huge volumes. As many as a combined 2.25 million shares have already changed hands on the counter in morning trades, as against an average of around 400,000 shares that were traded daily in past two weeks.
Shares of state-owned companies such as HMT and ITI rallied more than 10 per cent each on reports that the government is likely to infuse funds to revive the loss-making public sector undertakings (PSUs).
The broader markets were in-line with the benchmark indices with BSE mid-cap and small-cap indices advancing 1 per cent each.
The overall breadth was positive as 1,758 stocks advanced while 1,155 stocks declined.
World's 25 biggest firms: IOC, RIL in Fortune's top 100
IMAGES: 25 most reputable companies in the world
Despite low GDP, Moody's upbeat about India's future
Sensex gains over 165 pts in early trade
I have not given up hope on Trinamool: PM