Indian stock markets extended their rally for the fifth straight session, with both the Nifty and the Sensex posting strong gains. The positive momentum came amid easing global tensions and steady domestic policy signals. The Nifty closed 3.78 per cent higher, gaining 873.70 points to end at 23,997.35.