Colombo: Ahmed Shehzad and Azhar Ali scored half-centuries against Sri Lanka and shared 120 runs for the second wicket to put Pakistan back into the second test, closing at 171-2 Saturday in its second innings at stumps on the third day.
Pakistan was just six runs away from eliminating a 177-run first innings deficit when bad light stopped play early.
Shehzad (69) was dismissed in the first ball after tea when he hit Dhammika Prasad for a high catch to wicketkeeper Dinesh Chandimal.
Ali was unbeaten on 64, batting with Younis Khan on 23.
Shehzad and Ali came together after Pakistan lost Mohammad Hafeez early, caught by Kumar Sangakkara at slip off Angelo Mathews.
Sri Lanka scored 315 in its first innings in reply to Pakistan's 138.