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.
Earlier, having taken an 87-run first innings lead, India resumed on 70-1 and scored freely.
Rahane was characteristically composed while Murali Vijay (82) displayed aggression by hitting both paceman Dushmantha Chameera and off-spinner Tharindu Kaushal (4-118) for six.
Kaushal had the last laugh as he ended the 140-run stand trapping Vijay leg before after the batsman went for a sweep shot and missed the line.
The 22-year-old off-spinner dealt another blow when he accounted for rival captain Virat Kohli who also fell leg before.
Rahane showed the temperament that prompted his promotion to number three in the batting order but was not afraid to attempt an occasional cheeky shot, like the reverse-sweep for four off Kaushal that brought up his 50.
He added 85 runs with Rohit Sharma (34) to consolidate India’s position and took 212 balls to complete his century before Kaushal dismissed both.
India scored at a healthy four-an-over run rate in the second session and their only worry appeared to be the fitness of wicket-keeper Wriddhiman Saha, who retired hurt with a strain but returned to bat again.