Twin centuries from Tillakaratne Dilshan and Kumar Sangakkara went a long way towards Sri Lanka closing day four of the second Test against Pakistan on 278 for five.
Replying to 551 for six in a match that has been badly affected by rain, the hosts have almost certainly done enough to stave off a defeat.
Dilshan (121) and Sangakkara (144 not out) shared a 225-run partnership for the second wicket but four wickets late in the day took some of the gloss off of their batting effort.
Dilshan faced 195 balls, hitting 13 fours and a six while Sangakkara faced 254 balls, hitting 14 fours and the two players batted for a total of 63 overs together.
Sangakkara reached his 30th Test century and Dilshan passed three figures for the 14th time.
Pakistan's fightback began when Dilshan was trapped in front by Junaid Khan and three other batsmen were also dismissed leg before.
Junaid struck again to remove Mahela Jayawardene for an eight-ball duck as he ended the day with figures of three for 56.
Thilan Samaraweera then faced 18 balls but failed to get off the mark before he was trapped in front by Saeed Amal and the day was brought to a close when Abdur Rehman had Suraj Randiv pinned in front for five.
Pakistan, who trail the three-match series 1-0, dominated the first two days of the Test as Mohammad Hafeez (196) and Azhar Ali (158) both hit new career-bests.
The rain then ruined much of day three.
© Cricket World 2012
Open an account with bet365 today and qualify for up to £200 in free bets with our fantastic 100% Deposit Bonus.