|Dhoni celebrates the wicket of Tharanga Paranawethana [AFP]
Part-time India spinner Virender Sehwag followed up his heroics with the bat to bring the third Test to life with two late wickets and leave Sri Lanka struggling at 45 for two at the close on the third day.
Sri Lanka led by 34 runs on Thursday after losing the wickets of Tharanga Paranavitana and Tillakaratne Dilshan in 13 balls to give India hope of levelling the series in Colombo.
Paranavitana was caught by wicketkeeper Mahendra Singh Dhoni for 16 and Dilshan was snapped up smartly at short leg by Murali Vijay for 13.
Kumar Sangakkara and nightwatchman Suraj Randiv saw Sri Lanka through a nervous last 12 minutes without further loss.
India were dismissed for 436, a lead of 11 runs, off-spinner Randiv wrapping up the innings with the last three wickets to finish with career-best figures of four for 80.
Randiv broke the eighth-wicket partnership of 64 between Abhimanyu Mithun and Amit Mishra by having the former caught at leg slip by Mahela Jayawardene for 46.
He followed it up with the wickets of Mishra for 40 and Ishant Sharma for eight.
Sri Lanka picked up the wickets of Vangipurappu Laxman, Suresh Raina and skipper Mahendra Singh Dhoni in the afternoon session.
Laxman (56) edged a catch to slip and Raina (62) played a check shot to short mid-wicket, both off Ajantha Mendis.
Lasith Malinga removed Dhoni for 15 as the Indian captain went to pull a short delivery and gloved a catch to Prasanna Jayawardene.
India resumed in the morning on 180 for two and quickly lost overnight batsmen Sehwag and Sachin Tendulkar.
Tendulkar added just one run to his score of 40 before edging paceman Malinga to wicketkeeper Jayawardene.
Sehwag completed his 21st test century off 90 balls when he pulled Randiv for his 18th four but, on 109, he played a loose shot off the same bowler to give a simple catch to mid-off.
Sri Lanka lead the three-match series 1-0.