Snapping a three-day losing run, the BSE Sensex today surged 387.69 points on the back of lower crude oil prices after a historic deal between world powers and Iran on its controversial nuclear programme.

Buying was all-round with 12 of the 13 sectoral BSE indices ending in the green. Capital goods, banking, realty and PSU shares saw heavy buying. Oil&gas shares, including PSU fuel companies, were in the limelight.

The BSE Sensex, which had shed 673.43 points in the previous three sessions, shot up by 387.69 poins, or 1.92 per cent to end 20,605.08 -- near the day's highs. 27 of the 30 index constituents closed up. ICICI Bank, ITC,HDFC, HDFC Bank and Larsen & Toubro contributed over 237 points of the index's surge.

Brokers said after the recent fall in markets, the Iran-deal news was lapped up by bullish investors and markets moved up on strong volumes. Fears of US stimulus tapering were also shrugged off, they added.

Indian stocks emerged as the star performer in Asian and European markets as falling oil prices eased inflation concerns. Reacting to the historic deal, Brent crude fell by more than 2 per cent in early Asian trade to USD 108.5 levels.

On similar lines, the broad-based National Stock Exchange index Nifty spurted by 119.90 points, or two per cent, to 6,115.35.

"Positive global cues and strong opening of European indices also boosted market sentiments. The rupee too firmed up against dollar and was seen trading near 62.5 level," said Nidhi Saraswat, Senior Research Analyst, Bonanza Portfolio.

Among PSU oil stocks, Hindustan Petroleum surged 6 per cent, Bharat Petroleum 4.45 per cent, Indian Oil by 2.52 per cent and Oil India by 1.44 per cent.

Sectorally, the BSE Capital Goods index gained the most by rising 3.82 per cent on the back of Crompton Greaves, BHEL and L&T. It was followed by BSE Bankex 3.63 per cent and BSE Realty 2.28 per cent. IT shares, however, had a forgettable day with Infosys down 0.7 per cent.