COLOMBO (AFP) - Former captain Shoaib Malik hit an unbeaten 106 on Wednesday to put Pakistan on course for a face-saving victory in the third and final Test against Sri Lanka here. Pakistan, who lost the first two Tests to hand Sri Lanka a decisive lead in the series, finally flexed their batting muscle to pile up 300-5 in their second innings by stumps on the third day. Kamran Akmal returned unbeaten on 60 after adding 114 for the unbroken sixth wicket with Malik as Pakistan established an overall lead of 366 runs with five wickets in hand. Sri Lanka will need to put on their best batting display in the series to record a 3-0 sweep over the remaining two days after failing to cross 300 in any of the five previous innings. Pakistan appeared to have thrown away the advantage of a 66-run first innings lead when, starting the day at 16-1, they lost three quick wickets to slip to 67-4 before lunch. Malik and Misbah-ul Haq led the fightback with a 119-run stand for the fifth wicket, staying together for the entire post-lunch session to frustrate the Sri Lankan bowlers on a hot and humid day. Misbah made 65 before he gifted his wicket after tea, attempting a wild heave off seamer Angelo Mathews that took the edge to wicket-keeper Kumar Sangakkara. Malik reached his second Test century just before close by lofting left-arm spinner Rangana Herath for a six, having survived a missed stumping by Sangakkara in the bowler's previous over. The hosts missed a second spinner alongside Herath after dropping Ajantha Mendis to accommodate veteran seamer Chaminda Vaas for his final Test in a four-man pace attack. Vaas, who claimed one wicket in the first innings, was kept out of the firing line till the 33rd over on Wednesday before sending down 14 unsuccessful overs for 29 runs. Pakistan had added just six runs to their overnight score when Fawad Alam fended at a short ball from left-arm seamer Thilan Thushara and spooned an easy catch to the bowler. Left-handed Alam, who hit 168 on debut in the second Test, scored 16 in each innings here. Younus Khan looked solid while making 19 when he was unfortunate to be given leg-before to Nuwan Kulaksekera by umpire Ian Gould. Television replays showed an inside edge off the bat. Younus walked back dejected as Pakistan slipped to 54-3, just 120 runs ahead. Veteran Mohammad Yousuf was on 23 when he poked at a good length delivery from left-arm spinner Herath and edged a catch to wicket-keeper Sangakkara. The Sri Lankan captain, who keeps wickets in limited-over internationals but is reluctant to do the job in Tests, was forced to don the gloves after Tillakaratne Dilshan was laid low with injuries. Dilshan broke a finger in his right hand while keeping wickets on the first day, and then suffered a bloody cut over the left eyebrow while batting on Tuesday. He is likely to miss the five one-day matches against Pakistan starting on July 30. SCOREBOARD PAKISTAN, 1st innings: 299 (Khurram Manzoor 93, Mohammad Yousuf 90, Shoaib Malik 45, T. Thushara 5-83, N. Kulasekera 3-47) SRI LANKA, 1st innings: 233 (K. Sangakkara 45, M. Jayawardene 79, T. Dilshan 44, D. Kaneria 5-62, S. Ajmal 3-70) PAKISTAN, 2nd innings: (overnight 16-1): Khurram Manzoor b Herath 2 Fawad Alam c and b Thushara 16 Younus Khan lbw b Kulasekera 19 Yousuf c Sangakkara b Herath 23 Misbah c Sangakkara b Mathews 65 Shoaib Malik not out 106 Kamran Akmal not out 60 EXTRAS: (b6, lb2, w1) 9 TOTAL: (for 5 wkts, 95 overs) 300 Fall of wickets: 1-16 (Manzoor), 2-22 (Alam), 3-54 (Younus), 4-67 (Yousuf), 5-186 (Misbah). BOWLING: Kulasekera 15-5-33-1 (w1) Thushara 19-2-84-1 Herath 37-6-113-2 Vaas 14-6-29-0 Mathews 10-1-33-1 Pakistan lead by 366 runs with five wickets in hand; Toss: Sri Lanka Umpires: Simon Taufel (AUS) and Ian Gould (ENG) TV umpire: Gamini Silva (SRI) Match referee: Alan Hurst (AUS)