Debutant Fawad Alam hit a maiden test century as the Pakistani cricketers battled back against Sri Lanka on the second day of the second test in Colombo.
Opener Alam was unbeaten on 102 as Pakistan reached 178 for one in their second innings, a lead of 28 runs.
Pakistan were bowled out for 90 on the first day but their bowlers began the fightback last night with paceman Umar Gul taking 4 for 43 and off spinner Saaed Ajmal 4 for 87 as Sri Lanka, who had resumed on 164 for three, were bowled out for 240.
Having lost seven wickets for 76 runs, the hosts then saw their 150-run lead wiped-out during the afternoon as the 23-year-old left-hander Alam, who normally bats in the middle order, became the first Pakistani to score a century overseas on his test debut.
Sri Lanka won the first match of the three-test series by 50 runs.