Rising for the second straight day on Monday, the Sensex jumped 161 points to 26,586.55 as auto and healthcare shares surged on strong factory output data and steady inflation, while value-buying in beaten-down stocks also added to the upside.
The NSE Nifty managed to end above 8,000-level by rising 31 points or 0.39 per cent to 8,013.90 after shuttlingbetween 8,057.70 and 7,944.85 intra-day.
"Markets witnessed a relief rally today on the bourses supported by improved macroeconomic data -- IIP and inflation numbers. The arrival of the monsoon in the southern part...also improved the sentiment," said Gaurav Jain, Director of Hem Securities.
However, global markets hit by concerns over Greek debt talks capped the gains. Other Asian markets ended lower and European stocks were also down in their early trade."...there is a looming concern of Greece payment default on the street and on the world indices," Jain added.
In volatile movements, the 30-share Sensex after falling to the day's low of 26,307.84, staged a strong comeback at a rapid pace to hit high of 26,728.60.
On profit-booking towards the close at improved levels, it trimmed gains and settled 161.25 points or 0.61 per cent higher at 26,586.55.
The gauge had gained 54.32 points in the previous session.
Industrial production grew at a two-month high of 4.1 per cent in April, mainly driven by manufacturing sector, while retail inflation edged up to 5.01 per cent in May.
Meanwhile, another data showed wholesale inflation remained in the negative zone for the seventh consecutive month in May following easing fuel and food items prices.
In a research note, Citigroup said that overall, the monsoon is still a risk factor but "we expect CPI (retail inflation) to undershoot RBI's Jan-16 projection by 40 bps and average 5 per cent in 2015-16.
This is likely to create room for further 25 bps cut in current fiscal".
"Better than expected CPI and fair development to monsoon till-date is providing support...but still India is in risk-off mode, led by dollar liquidity which is impacting increase in global bond yield," said Vinod Nair, Head of Fundamental Research at Geojit BNP Paribas Financial Services.