COLOMBO, Sri Lanka: Rangana Herath put Sri Lanka within sight of victory in the second test against Pakistan by taking four second-innings wickets on Sunday.
Chasing 271 to win the test and level the two-match series, Pakistan were precariously placed on 127-7 at stumps on the fourth day with their last specialist batsman Sarfraz Ahmed (38 not out) batting with tailender Wahab Riaz (2).
Earlier, Pakistan's bowlers took eight Sri Lanka wickets for 105 Sunday in a remarkable fight back but the side crumbled on a turning Sinhalese Sports Club pitch.
Seamer Dhammika Prasad dismissed opener Khurram Manzoor (10) caught behind with the total on 17 and four runs later trapped Ahmed Shehzad lbw for eight.
Herath then snared Azhar Ali (10) caught at slip by Mahela Jayawardene, Younis Khan lbw for eight and captain Misbah-ul-Haq also caught by Jayawardene.
A 55-run stand for the sixth wicket between Ahmed and Asad Shafiq developed but Shafiq (32) in a sudden loss of concentration charged down the pitch against Herath and was stumped by wicketkeeper Niroshan Dickwella. Herath finished the day with a career-best test haul of 13-178, exceeding his previous best figures of 12-157 against Bangladesh last year.
Earlier Wahab Riaz and Saeed Ajmal took three wickets each to bowl out Sri Lanka for 282 in its second innings giving themselves 271 to win.
Sri Lanka resumed the fourth day in a strong position at 177-2 and a 165-run lead having conceded a first innings deficit of 12 but lost their remaining eight wickets for 105 runs leaving the match evenly poised.
Ajmal picked up the valued wickets of overnight batsmen Kumar Sangakkara (59) and Jayawardene, who was playing in his last test innings, for 54.
Sangakkara was caught by Azhar Ali at silly-point having faced 130 deliveries and hitting four fours. His dismissal ended a 107-run stand for the third wicket with Jayawardene, which came off 253 balls in three hours.
Sangakkara raised his bat and waved at the crowd as he walked off, signaling that he may have played his last home test innings. The left-hander on Saturday became the fifth highest scorer in test cricket, surpassing West Indies great Brian Lara.
Jayawardene stepped out and tried to force Ajmal but instead produced a high catch to Ahmed Shehzad to end his 17-year test career with 11,814 runs in 149 matches at nearly 50 runs per innings. His half-century Sunday was his 50th 50-plus score. He has scored 34 centuries.
Ajmal later bowled out Lahiru Thirimanne for 10.
Riaz dismissed Dickwella (21) and Dilruwan Perera (0) lbw in the space of three deliveries to rattle the hosts' middle and low order and returned 3-76.
Left-arm spinner Rehman dismissed both openers on Saturday recording 2-89.
Sri Lanka, which leads the two-match series 1-0, made 320 in its first innings and dismissed Pakistan for 332.