The S&P BSE Sensex and Nifty on Wednesday 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 Sensex resumed slightly higher but frittered away initial gains. However, helped by late buying the index hit 20750.52, before ending at 20722.97, a rise of 88.76 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 NSE 50-share Nifty firmed up by 25.65 pointsto 6152.75. — PTI