Left-arm pace bowler Mohammad Aamer claimed three wickets in an outstanding
|Debutant Mohammad Aamer makes his mark [AFP]
post-lunch spell to leave Pakistan chasing just 168 for victory in the opening Test against Sri Lanka
Pakistan bowled out the hosts for 217 and then finished the third day on 71 for two - just 97 runs shy of their victory target having lost the wickets of Khurram Manzoor (15) and Younis Khan (3).
Opener Salman Butt was unbeaten on 28 with first-innings centurion Mohammad Yousuf on 12 with the tourists closing in on a 1-0 lead in the three-match series.
The 17-year-old Aamer followed up on his impressive first innings performance (3-74) by capturing the key wickets of Tharanga Paranavitana (49), Mahela Jayawardene (0) and Kumar Sangakkara (14) as the tourists took control.
Aamer went wicketless during a rain-shortened morning session but swung the ball both ways in the afternoon to reduce Sri Lanka to 101-5 after they had appeared comfortable on 86-2.
The debut-making teenager finished with figures of 3-38 from 11 overs and a match haul of six for 112.
In the morning after a delayed start, opener Malinda Warnapura lasted just two balls in the morning before edging an Umar Gul delivery to slip.
However, Paranavitana steadied the innings in partnership with Rangana Herath, the pair adding 68 for the second wicket.
Paranavitana, Sri Lanka's first-innings top scorer, had batted beautifully for his 49 from 58 deliveries with five boundaries before edging a quick outswinger to wicketkeeper Kamran Akmal.
Former skipper Jayawardene, who averages over 80 at this seaside venue, was also caught behind off a delivery that nipped off the seam towards the slips.
Sri Lanka innings 292
Pakistan innings 342
Sri Lanka second innings
R Herath lbw Khan 15
M Warnapura c Khan b Gul 0
T Paranavitana c Akmal b Aamer 49
K Sangakkara c Akmal b Aamer 14
M Jayawardene c Akmal b Aamer 0
T Samaraweera c Misbah b Ajmal 34
T Dilshan c Mansoor b Khan 22
A Mathews c Butt b Rauf 27
N Kulasekara lbw Ajmal 25
T Thushara not out 15
A Mendis b Ajmal 1
Total (all out, 56.2 overs) 217
Fall of wickets: 1-0, 2-68, 3-86, 4-88, 5-101, 6-138, 7-156, 8-191, 9-211, 10-217
Pakistan second innings
K Manzoor c Jayawardene b Mendis 15
S Butt not out 28
Y Khan lbw Mathews 3
M Yousuf not out 12
Extras (12-b, 1-w) 13
Fall of wickets: 1-36, 2-39
Captain Sangakkara pushed loosely at another outswinger and Akmal completed a fine diving catch in front of first slip.
Younus Khan also chipped in with vital wickets with his medium pace, first trapping nightwatchman Herath (15) in the morning and then dismissing the in-form Tillakaratne Dilshan (22), who steered a full-length delivery to gully.
Off-spinner Saeed Ajmal struck in the final half-hour of the afternoon session as the well-set Thilan Samaraweera, who had stroked 34 from 67 balls, was caught at slip off his doosra.
Ajmal also polished off the tail, trapping Nuwan Kulasekara lbw for 25 and bowling last-man Ajantha Mendis for one to finish with three for 34 from 12.2 overs.
Pakistan's openers made a steady start with a 36-run stand before Mendis had Manzoor caught at slip immediately after a drinks break and ball change.
Next over Mathews pinned Khan lbw with a delivery that seamed-back sharply to leave Pakistan 39 for two.
Yousuf and Butt negotiated the final tense overs to leave Pakistan with an excellent chance of winning on Tuesday.