Wahab Riaz took 3-10 as the Lankans finished the day on 34-5 in their second innings.
At the moment, Sri Lanka is having a lead of 254 runs with Kusal Mendis at the crease on eight.
On Day-2 of the second Test between Pakistan and Sri Lanka, the world witnessed a freakish moment of play when Riaz missed his run-up and ended the delivery five times in a row. Deciding to not enforce the follow-on, they came in to bat late Sunday only to face the wrath of Wahab - who had looked feeble and uncomfortable just a day earlier.
Azhar Ali and Haris Sohail stabilised the innings for the hosts as they amassed a 71-run partnership, during which Azhar brought up his half-century.
England's Sancho scores brace in 4-0 win over Chile
Brewster had two more chances before the break, heading the first one wide before his angled chip was blocked by Borquez. However former England manager Glenn Hoddle picked out 17-year-old Foden for particular praise.
Pakistan continued to lose wickets at regular intervals after Azhar's dismissal, including that of Sohail, who scored 56 off 135 deliveries, which included four boundaries and two sixes.
Pakistan fast bowler, whose mesmerizing spell to Shane Watson during a Pakistan-Australia match in 2015 rose him to fame, is again talk of the town, but not for a good reason this time. It beaten Pakistan by 21 runs in first Test played in Abu Dhabi from September 28 to October 2.
But what Pakistan left-arm pacer Wahab Riaz did in a Test against Sri Lanka takes the cake. "We have chased 370 plus runs to beat Sri Lanka in a Test match and that should give us confidence,", he concluded.