Maestro Sachin Tendulkar scored his 48th test century on Wednesday and shared an unbroken 141-run partnership for the fifth wicket with debutant Suresh Raina to lead India's fightback in the second cricket Test against Sri Lanka.
India were vulnerably placed on 243-4 at tea on day three needing 200 runs to avoid follow on, but it reached 382-4 at stumps.
India just needs 61 runs to avoid follow on with six wickets in hand.
Tendulkar was unbeaten on 108 at stumps having faced 181 balls and hitting 14 boundaries and a six. It was the 37-year-old batsman's sixth Test century for 2010.
Raina made a half-century in his maiden test innings and was not out on 66 off 133 balls, including eight boundaries.
India started a strong reply to Sri Lanka's first innings score of 642-4 declared with openers Virender Sehwag and Murali Vijay sharing 165 runs.
But Sri Lanka's spinners Suraj Randiv and Ajantha Mendis struck back with three wickets for eight runs as the visitors went for lunch on 173-3.
Sehwag, one run short of a century, stepped out to hit off spinner Randiv and was beaten by the bounce to be stumped by wicketkeeper Prasanna Jayawardene. He hit 15 boundaries in his 101-ball innings and his dismissal was Randiv's maiden Test wicket.
Vijay departed soon after for 58, trapped lbw by Mendis. Randiv then trapped Rahul Dravid lbw for three runs.
Tendulkar and V.V.S. Laxman shared a composed 68-run partnership for the fourth wicket, shoring up the innings before Mendis returned to trap Laxman lbw for 29 runs leaving India 241-4.
Randiv has replaced Muttiah Muralitharan who retired with a record haul of 800 wickets after the previous test in Galle. He returned bowling figures of 2-108 while Mendis had 2-92.
The hosts' giant total was mostly due to Kumar Sangakkara's classy 219 and Mahela Jayawardene's 174, while Tharanga Paranavitana also scored 100.