Pakistan needed their fast bowlers to bail them out after posting a disappointing 226 all out on the first day of the third and final Test against Sri Lanka [ Images ], at the Pallekele Stadium on Sunday.
Sri Lankan seam bowler Thisara Perera was at the centre of the action for the hosts, grabbing four wickets for 63 on his home Test debut.
Having lost four wickets for 56 runs, Pakistan, trailing 1-0 in the three-Test series, staged a recovery thanks to an 85-run stand for the fifth wicket between Asad Shafiq and skipper Misbah-ul-Haq.
Herath then wrapped up the innings by trapping Saeed Ajmal [ Images ] lbw for six to finish with figures of three for 40.
The tourists to hit back hard when pace duo bowlers Junaid Khan and Mohammad Sami [ Images ] tore into the Sri Lankan openers, taking three cheap top order wickets for a close total of 44.
Junaid, man of the match in the drawn second Test last week, struck twice in his fourth over, first trapping Dinesh Chandimal lbw for eight and then taking the prize wicket of Kumar Sangakkara [ Images ] for a duck, bowling a beauty that beat his bat and clipped the off stump.
The Sri Lankan captain's dismissal towards the end of the day has shifted the balance slightly towards Pakistan, although the home side's batting runs deep till number nine.