COLOMBO (AFP) - Debutant Fawad Alam scored an unbeaten century as Pakistan produced a remarkable turnaround to claw their way back in the second Test against Sri Lanka on Monday. The tourists, who were bowled out for 90 in their first innings, hit back to dismiss Sri Lanka for 240 and then cruised to 178-1 in their second knock by stumps on the second day. Left-handed Alam led the way with a determined 102 not out to give Pakistan a lead of 28 runs with nine wickets in hand on a dry pitch that appeared to have eased out under the hot sun. The fearless 23-year-old from Karachi moved to 98 by lofting left-arm spinner Rangana Herath for a six over mid-wicket and then flicked the next ball for two runs to reach the coveted century. Alam put on 85 for the first wicket with Khurram Manzoor, who made 38 before he was caught behind by wicket-keeper Tillakaratne Dilshan off Herath. Skipper Younus Khan, who was dismissed for zero in the first innings, was unbeaten on 35 at stumps after adding 93 for the unbroken second wicket with Alam. Sri Lankan captain Kumar Sangakkara rotated his seam and spin attack in short bursts to gain quick breakthroughs, but Pakistan's batsmen were not found wanting a second time. Pakistan's fightback was launched by seamer Umar Gul and off-spinner Saeed Ajmal, who took four wickets each to keep Sri Lanka's first innings in check. The hosts lost their last seven wickets for 63 runs after starting the day at a comfortable 164-3. Gul extracted reverse swing with the old ball on the dry wicket to rip through the innings, including the wickets of Nuwan Kulasekera and Herath off successive deliveries. Thilan Thushara denied Gul a hat-trick and Angelo Mathews hit a defiant 27 towards the end to boost Sri Lanka's total from 220-8 before the innings ended 20 minutes after lunch. The hosts lost the overnight pair of Sangakkara and Thilan Samaraweera within the first hour for the addition of 24 runs. Samaraweera, who made 21 in a fourth-wicket stand of 44 with his captain, was run out by a direct throw from Mohammad Aamer at mid-off while trying to attempt a cheeky single. Sangakkara plodded from his overnight score of 81 to 87 but was denied a 19th Test century when Gul pegged back his off-stump with a reverse-swinging delivery that came in sharply. Ajmal, who had claimed two wickets on Sunday, earned another crucial break when umpire Daryl Harper ruled Dilshan caught at the wicket by Kamran Akmal for 20 to make Sri Lanka 203-6. The hosts tripped to 220-8 soon after, when Gul had Kulasekera edging a wild heave to Misbah-ul Haq at first slip before taking a return catch off Herath with the next delivery. Thushara was leg-before to Abdur Rauf in the first over after lunch before Ajmal terminated the innings by having Mathews caught in the covers by Mohammad Yousuf. Sri Lanka won the first Test in Galle by 50 runs last week to take the lead in the three-match series. SCOREBOARD PAKISTAN, first innings 90 SRI LANKA, first innings (overnight 164-3) M. Warnapura lbw Gul 11 T. Paranavitana c Akmal b Ajmal 26 K. Sangakkara b Gul 87 M. Jayawardene c Manzoor b Ajmal 19 T. Samaraweera run out 21 T. Dilshan c Akmal b Ajmal 20 A. Mathews c Yousuf b Ajmal 27 N. Kulasekara c Misbah b Gul 11 R. Herath c & b Gul 0 T. Thushara lbw Rauf 1 A. Mendis not out 0 EXTRAS: (8-b, 1-lb, 8-nb) 17 TOTAL: (all out, 80 overs) 240 Fall of wickets: 1-28, 2-82, 3-133, 4-177, 5-188, 6-203, 7-220, 8-220, 9-227, 10-240 BOWLING: Gul 18-1-43-4 (4-nb) Aamer 13-2-36-0 Rauf 11-1-38-1 (3-nb) Ajmal 31-5-87-4 Khan 7-1-27-0 (1-nb) PAKISTAN, 2nd innings: K. Manzoor c Dilshan b Herath 38 F. Alam not out 102 Y. Khan not out 35 EXTRAS: (1-b,1-nb,1-lb) 3 TOTAL: (one wicket, 53 overs) 178 Fall of wicket: 1-85 To bat: Kamran Akmal, , Mohammad Yousuf, Shoaib Malik, Misbah-ul-Haq, Abdur Rauf, Umar Gul, Saeed Ajmal, Mohammad Aamer BOWLING: Kulasekara 9-2-25-0 Thushara 10-0-32-0 Mathews 6-0-20-0 Mendis 11-0-43-0 (1-nb) Herath 16-1-53-1 Paranavitana 1-0-3-0 Sri Lanka lead the three-match series 1-0.