SHARJAH (AFP) - Sri Lanka removed Pakistan's openers early to gain an upper hand on the second day of the third and final cricket Test against Pakistan at Sharjah stadium here on Friday. Sri Lanka, seeking a series-levelling win after losing the second Test by nine wickets in Dubai, removed M Hafeez (six) and Taufiq Umar (19) as Pakistan closed on 35-2 in reply to their rivals' first innings total of 413. The first Test in Abu Dhabi ended in a draw. Pakistan looked shaky from the start as Hafeez was dismissed in the fifth over of the innings, edging an outgoing delivery from left-arm paceman Chanaka Welegedara to slip for Mahela Jayawardene to take a simple catch. Left-arm spinner Rangana then struck in his third over, inducing Umar to come out of the crease and had him stumped by wicket-keeper Kaushal Silva, much to the disappointment of a holiday crowd of near 8,000 made up of Pakistan expats. At close, Azhar was unbeaten on ten and Younus Khan yet to get off the mark, as Pakistan still trail by 378 runs. Earlier, Saeed Ajmal led Pakistan's fightback with 4-132 after Sri Lanka, well placed at 300-3, lost five wickets in the space of 59 runs before they were guided past 400 by a ninth wicket stand of 54 between Silva (39) and Herath 34 not out. Umar Gul ably supported Ajmal with 3-76, but late additions to the Sri Lankan total frustrated Pakistan who had the upper hand in the first two sessions. Pakistan knew they had to remove Sangakkara to make inroads into the Sri Lankan middle-order after they dismissed Angelo Mathews for 17 in the last over before lunch, caught behind off left-arm spinner Abdul Rehman. It was Ajmal who finally provided Pakistan with the prized wicket of the stylish left-hander when his delivery jumped on Sangakkara, who failed to keep a pull down and was caught in the slip by Younus Khan after making 144. Sangakkara, who also crossed 9,000 Test runs during the innings, showed pleasure at helping the team. "It's pretty encouraging to know that I crossed the 9,000 runs," said Sangakkara, only the second Sri Lankan behind Jayawardene to reach the milestone. "My job is to keep scoring runs and every Test is a new challenge." Sangakkara hit 13 fours and two sixes during his 344-ball knock, which began in the first over of the match on Thursday. This was his second century of the series following an epic match-saving 211 in Abu Dhabi. Sangakkara put on 84 for the third wicket with Jayawardene (39) and another 39 with Mathews for the fourth after Sri Lanka resumed at 245-2. Jayawardene managed to add just seven to his overnight score of 32 before being given leg-before off paceman Khan. Jayawardene hit two boundaries during his highest score of the series. Sangakkara and Mathews negotiated Pakistan's pace-spin attack with confidence, taking Sri Lanka past the 300-mark in the penultimate over before lunch. But Pakistan struck in the last over before lunch as they got the second wicket in the session, with Sri Lanka managing 55 runs in two hours. ScoreCard SRI LANKA 1ST INNINGS: (OVERNIGHT: 245-2): T Paranavitana c Younus b Gul 4 T Dilshan c Younus b Ajmal 92 K Sangakkara c Younus b Ajmal 144 M Jayawardene lbw b Khan 39 A Mathews c Akmal b Rehman 17 K Silva c Ali b Ajmal 39 K Kulasekara lbw b Ajmal 15 S Randiv lbw b Gul 1 D Prasad c Akmal b Khan 17 R Herath not out 34 C Welegedara b Gul 0 EXTRAS: (lb5, nb6) 11 TOTAL: (all out; 153.3 overs) 413 FOW: 1-4, 2-177, 3-261, 4-300, 5-304, 6-330, 7-331, 8-359, 9-413 BOWLING: Gul 29.3-10-76-3, Khan 27-4-94-2, Ajmal 51-4-132-4, Rehman 45-14-103-1, Hafeez 1-0-3-0 PAKISTAN 1ST INNINGS: M Hafeez c Jayawardene b Welegedara 6 Taufiq Umar st Silva b Herath 19 Azhar Ali not out 10 Younus Khan not out 0 TOTAL: (for 2 wkts; 20 overs) 35 FOW: 1-8, 2-35 BOWLING: Welegedara 5-1-11-1, Prasad 4-0-9-0, Kulasekara 3-0-14-0, Herath 5-4-1-1, Randiv 3-3-0-0 TOSS: Sri Lanka UMPIRES: S Taufel (NZ), S Tarapore (Ind) TV UMPIRE: Shozaib Raza (Pak) MATCH REFEREE: David Boon (Aus)