The Nifty rose on Wednesday, inching up close to a record high, as investors bought shares in under-performing sectors such as drug makers and state-run lenders, while sentiment was also supported on easing North Korea tensions.
The NSE index was on track for its fifth consecutive daily increase, and was steadily recovering from an about 1.6 percent fall in August.
The gains would likely be extended in the near term, analysts said, although advances would be tempered by caution over global risk factors and the domestic economy.
Data late on Tuesday showed India's consumer price inflation rose more than expected to a five-month high of 3.36 percent, dampening chances of a rate cut by the central bank at its policy review next month.
The U.N. Security Council voted unanimously to boost sanctions on North Korea on Monday, but a tougher initial U.S. draft was weakened to win the support of China and Russia, both of which hold U.N. veto power.
"The Korea tensions have eased and the markets are near all time high," said A.K. Prabhakar, head of research at IDBI Capital Markets & Securities Ltd.
"Nifty (NSE index) could breach its record high by today or tomorrow."
The broader NSE Nifty was up 0.19 percent at 10,112.55 as of 0644 GMT, not far from its record high of 10,137.85 hit on August 2.
The benchmark BSE Sensex was 0.32 percent higher at 32,260.47.
Shares of drug makers, which have been among the big losers this year, climbed on Wednesday, with Sun Pharmaceutical Industries Ltd up 2.1 percent, and Dr.Reddy's Laboratories Ltd rising 2.3 percent.
The Nifty Pharma index fell 13.7 percent as of August-end, but has gained about 3 percent so far this month.
Bank shares also gained on hopes of additional capital infusion from the government, with Bank of India Ltd and Union Bank of India Ltd up more than 2 percent each.
The Nifty PSU Bank index has recovered slightly this month after slumping 11.6 percent in August.
Among other gainers, shares of Reliance Industries Ltd climbed more than 4 percent to hit a record high, while financial firm Capital First Ltd hit a more than 9-year high after India's banking regulator raised its foreign investment limit to 50 percent.