Pakistan have almost wiped out a 177-run first-innings deficit by reaching 2-171 in their second knock at stumps on the third day of the second Test against Sri Lanka in Colombo.
Ahmed Shehzad (69) and Azhar Ali (64 not out) put on 120 runs for the second wicket on Saturday after Mohammad Hafeez was dismissed by Angelo Mathews for eight.
Younis Khan was unbeaten on 23, having added 42 so far for the third wicket with Azhar, which left Pakistan trailing by just six runs.
Sri Lanka, who resumed at their overnight score of 9-304 after a delayed start due to bad weather, were dismissed for 315.
Leg-spinner Yasir Shah finished with figures of 6-96.