Bad light stopped play in the second Test in Galle with Pakistan on 89-1 in their mammoth chase of 508 against Sri Lanka on Wednesday.
Left-handed opener Imam-ul-Haq, on 46, and skipper Babar Azam, on 26, were at the crease with more than 90 minutes and 26 overs of play left in the final session on day four.
Dhananjaya de Silva hit 109 before Sri Lanka declared their second innings on 360-8 in the second session.
Tourists Pakistan, who won the first match of the two-Test series, face an almost impossible task if they are to make it 2-0.
They need to bat out over three sessions for a draw.