(CNN) -- Virender Sehwag was the star with bat and ball as he offered India a glimmer of hope as they bid to win the third Test and level the series against Sri Lanka.
The batsman completed his 21st Test century soon after the start of play on Thursday morning after India resumed on 180-2 in reply to Sri Lanka's first innings total of 425.
And after half centuries from VVS Laxman and Suresh Raina had helped India to 436 all out, Sehwag took two wickets to reduce Sri Lanka to 45-2 at the close and heap pressure on their middle order.
Sehwag quickly passed the hundred mark in the first session but fell soon after for 109, caught by Chanaka Welegedara off the bowling Suraj Randiv.
Sachin Tendulkar made 41 before he was caught behind by wicketkeeper Mahela Jayawardene off the bowling of Lasitha Malinga.
Laxman then added 56 and Raina made 62 before they were both removed by Ajantha Mendis.
Abhimanyu Mithun and Amit Mishra both added valuable runs to see India past Sri Lanka's total before Randiv removed both players to bring an end to the innings.
Sri Lanka were unable to negotiate the final session without losing a wicket as both opening batsman fell to Sehwag.
Tharanga Paranavitana was caught behind by captain MS Dhoni before Sehwag snagged Tillakaratne Dilshan thanks to a catch from Murali Vijay.
Sri Lanka will resume on day four just 34 runs ahead of their rivals, with eight wickets remaining. They lead 1-0 in the three match series.