Markets extended Thursday's gains following global rally after a decision by International Energy Agency to increase oil supplies and a resolution over Greece debt crisis.
Nifty made a gap up opening and moved higher after oil prices eased, relieving concerns of inflation.
The index touched a high of 5,477 in the afternoon session led by rally in heavyweight ICICI Bank, Infosys and Larsen & Tourbo.
The S&P CNX Nifty closed near day's high at 5,471, up 151 points and the Sensex ended at 18,241, up 513 points. This was biggest rally since March 1st 2011.
Among the frontline shares, ICICI Bank, Infosys and L&T contributed 150 points on the Sensex.
Earlier in the week Sensex shed around 360 points on speculation related to changes in the Indo-Mauritius tax treaty and mid-week Indian Metrological Department reduced the Monsoon forecast which kept investor to the sidelines.
But positive global sentiment and fall in oil prices helped markets pare all the early week losses and end higher by 2% on weekly basis.
This was the first weeky gain after two consecutive weeks of losses.
The International Energy Agency decided to turn on the oil spigot and release 60 million barrels driving down crude prices to four month lows which caught investors off guard and spurred a rally across financial markets. Brent Crude fell 6% to $107.5/bbl and Nymex crude dropped to $91/bbl.
Additionally
In Asia, markets ended on firm note. Japan's Nikkei Stock Average rose 0.9%, South Korea's Kospi Composite gained 1.7%, China's Shanghai Composite Index rose 2.2% and Hong Kong's Hang Seng Index climbed 1.9%.
While the Indian markets joined the global market rally, analysts recommend retail investors to be cautious as this could just be a dead cat bounce -- temporary recovery from a prolonged decline and investors may get caught on the wrong foot.
Also fundamentally things have not changed much as political stalemate in Delhi is still on and Reserve Bank of India would continue its tightening measures until there are clear signs of inflation easing.
Among individual stocks renewed buying interest was seen in heavyweights State Bank of India and Larsen & Tourbo as they were available at attractive prices. State Bank of India advanced 6% to Rs 2291 and Larsen & Tourbo added 4.3% to Rs 1740.
Most of the Sensex stocks ended in the positive but Reliance Industries succumbed to profit booking after yesterday's gains and was down 0.3%.
A K Prabhakar Senior Vice President Equity Research, Anand Rathi said unless RIL closes above Rs 920 investors should avoid the stocks and a fall below Rs 830 would lead to a correction towards 750.