Domestic benchmark indices Sensex and Nifty today rose for the fourth straight day and ended at nearly one-month high levels, helped by smart gains in IT and pharma shares amid persistent foreign capital inflows.

Small-cap and mid-cap shares also saw good demand from retail investors, traders said.

The BSE Sensex resumed slightly higher but frittered away initial gains. However, helped by late buying the index hit 20,750.52, before ending at 20,722.97, a rise of 88.76 points or 0.43 per cent. This is its best closing since 21,133.56 on January 24. In four days, the Sensex has gained 530 points.

Sun Pharma and Infosys led the 16 Sensex gainers. Tata Power and Sesa Sterlite were among the 13 laggards while Tata Motors closed unchanged in the 30-share Sensex.

"The announcements made in the Interim budget, along with easing inflation, has boosted market sentiment. Also, value buying is seen from lower levels," said Nidhi Saraswat, Senior Research Analyst, Bonanza Portfolio.

The NSE 50-share Nifty firmed up 25.65 points, or 0.42 per cent, to end at 6,152.75 -- its strongest close since 6,266.75 on January 24. In four sessions, it is up 152 points.

Sun Pharmaceutical Industries rose 2.35 per cent – clocking the best gain in BSE Sensex -- following reports that company has received US Food and Drug Administration's approval to sell a drug to treat osteoporosis.

Other major gainers from the Sensex pack were Infosys 2.10 per cent, TCS 1.49 per cent,