Sri Lanka's Tillakaratne Dilshan and Kumar Sangakkara smashed successive centuries against Pakistan to light up the rain-hit second Test in Colombo on Tuesday.
The hosts, replying to Pakistan's first innings total of 551-6 declared, took their overnight score of 70-1 to 278-5 by stumps on the fourth day at the Sinhalese Sports Club.
Dilshan scored 121 and Sangakkara was unbeaten on 144 as the pair put on 225 runs for the second wicket after opener Tharanga Paranavitana fell for zero on Monday.
Pakistan grabbed four wickets in the final session to leave Sri Lanka still needing 74 more runs to save the follow-on on the last day.
But a draw appears likely as rain once again wiped off two hours of play in the post-lunch session after bad weather on the previous two days restricted the bowlers to only 71 of the stipulated 180 overs.
More rain has been forecast for the final day on Wednesday.
Sangakkara had scored an unbeaten 199 and Dilshan made 101 in the first Test in Galle last week which Sri Lanka won by 209 runs to take the lead in the three-match series.
Both settled down once again to pound the Pakistani attack on a dead pitch that provided no assistance to the bowlers.
Dilshan was the first to the landmark, lofting off-spinner Saeed Ajmal for a six to bring up his 14th Test hundred and the third against Pakistan.
Left-handed Sangakkara surpassed Australian legend Don Bradman's tally of 29 centuries with a single off Ajmal in the next over.
When Sangakkara reached 60, he become the highest run-getter against Pakistan, surpassing Indian great Sunil Gavaskar's tally of 2,089 runs from 24 Tests.
Sangakkara, who is playing his 15th Test against Pakistan, has scored nine centuries against them with a top score of 230 in Lahore in March, 2002.
Dilshan was dismissed in the final hour of play when he was trapped leg-before by left-arm seamer Junaid Khan. He hit 13 fours and a six.
Junaid then picked up his third wicket as skipper Mahela Jayawardene padded up to an incoming delivery and was declared leg-before by umpire Simon Taufel for no score.
Ajmal removed Thilan Samaraweera for zero and Abdur Rehman sent back nightwatchman Suraj Randiv in the day's last over to enable Pakistan to end the day on a high.
The third Test will be played in Pallekele from July 8.