Sri Lankan batting great Kumar Sangakkara made 18 in his final Test innings as India dominated fourth day's play in the second Test to stand eight wickets away from a series-levelling victory.
For the fourth successive innings in the series, off-spinner Ravichandran Ashwin dismissed the 37-year-old left-hander to send groans across the P Sara Oval.
Sangakkara walked out to a guard-of-honour by the Indians and the umpires and nearly ran himself out soon after a mix-up with opener Dimuth Karunaratne.
The southpaw unleashed the trademark flick and straight drive but could not convert the start, edging Ashwin to gully.
India rode Ajinkya Rahane's 126 to reach 325-8 before declaring to set Sri Lanka, who lead the three-test series 1-0, a difficult 413-run victory target.
Ashwin dismissed Kaushal Silva and Sangakkara to peg back Sri Lanka who were 72-2 at close, still 341 runs behind the target.
Skipper Angelo Mathews (23) and Karunaratne (25) will return to continue Sri Lanka's resistance on the final day of the Test on Monday.
India 393 all out & 325-8d (Rahane 126, Prasad 4-43)
Sri Lanka 306 all out & 72-2 (Karunaratne 25, Ashwin 2-27)