Before bad light brought the fourth day to an end with a theoretical 13 overs remaining, first drop Dhananjaya de Silva (13) and former Lanka skipper Angelo Mathews (zero) were batting at the crease, still trailing India by 379 runs with seven wickets remaining.
Chasing a daunting target of 410 runs to chase, Mohammed Shami and Ravindra Jadeja ripped through Sri Lanka's top order as they dismissed Dimuth Karunaratne (13), Sadeera Samarawickrama (five) and Suranga Lakmal (zero) cheaply to put India on course of a victory.
While Ravindra Jadeja bagged two wickets by conceding just five runs, Shami chipped in with a wicket by giving away eight runs.
The hosts, who are leading by 1-0 in the three-match series after winning the second Test by an innings and 239 runs in Nagpur, need another seven wickets to claim series.
Earlier in the day, Shikhar Dhawan (67), Cheteshwar Pujara (49), Virat Kohli (50) and Rohit Sharma (50) all contributed with the bat as India declared their second-innings total of 246-5.
For Sri Lanka, Suranga Lakmal, Lahiru Gamage, Dilruwan Perera, Dhananjaya de Silva and Lakshan Sandakan all chipped in with a wicket.
Yesterday, Ravichandran Ashwin and Ishant Sharma picked three wickets, while Jadeja and Shami took two wickets each to bundle out Sri Lanka for 373 runs in their second innings in reply to India's massive first-innings declared total of 536-7.(ANI)