The Sensex, after touching a high of 17,448 ended up 439 points at 17,430.
Nifty ended up 130 points at 5,279.
In Asia, shares jumped and the euro surged more than 1% after European leaders agreed that euro zone banks could be recapitalised without adding to government debt, soothing fears over growing credit strains in Italy and Spain.
Nikkei added 1.5% to 9,007. Hang Seng and Shanghai Composite 1-2% each.
"This EU summit was very keenly watched by the investors as the European crisis has been a long hang over on the markets and on the investor sentiments as well.
So favourable announcements from them will boost the sentiments globally including India," said A K Prabhakar, Senior Vice President Equity Research, Anand Rathi.
Meanwhile, Morgan Stanley has upgraded Indian stocks to "equalweight" after being "underweight" since the first quarter of 2011, saying India is now trading at a price to book multiple of 2.1x, close to the trough valuations of 2.0x in the 2002 and 2008 cycles.
In other news, the Prime Minister's Office clarified that the GAAR guidelines that have been put up on the government website from the official level of the Finance Ministry and shared with some stakeholders are only draft guidelines.
BSE capital goods index surged 3.6% to 10,025. Power index followed with gains of 3.5% at 1,919.
Power stocks rose on hopes that lower international
Markets end flat ahead of EU summit
IMAGES: The top 10 cities of the world!
GAAR to be finalised after consultation with PMO: FinMin
Markets end higher ahead of June F&O expiry
Air India crisis: Pilots seek PM, Sonia's intervention