But veteran Herath (six for 43) and his fellow finger spinner Dilruwan Perera (three for 46) had other ideas. Pakistan's Yasir Shah had 2-25 off 14 overs to set up an uncomfortable last day for Sri Lanka which has a vulnerable tail.
The fact Sri Lanka head to Dubai for the second match - and their first floodlit Test - on Friday knowing they can not lose the series is a remarkable effort on a number of counts.
Herath also became the first left-arm spinner to bag 400 wickets in Tests.
Herath has now picked up 10 wickets in a match on nine occasions and also has 33 five-wicket hauls.
All it did, as it turned out, was delay both the inevitable defeat for Pakistan, as well as Herath becoming the first left-arm spinner to take 400 wickets in Tests.
Rangana Herath and Dilruwan Perera lead the bowling attack for the Sri Lankan side.
Wall Street wraps up strong week and quarter; S&P closes at record
Advancing issues outnumbered declining ones on the NYSE by a 1.47-to-1 ratio; on Nasdaq , a 1.54-to-1 ratio favoured advancers. Trump, who claimed as a candidate that the market was in a "big, fat, ugly bubble", brags about it now that he's in charge.
Dimuth Karunaratne walked even though neither his bat nor glove seemingly made any contact with a Yasir Shah delivery that was pouched at short leg, before part-timer Asad Shafiq had Lahiru Thirimanne caught behind. Only Haris Sohail showed some resistance and when he was batting with captain Sarfraz Ahmed, Pakistan believed, but then Herath stepped up and got rid of Sarfraz to send the Pakistan innings hurtling towards a frenetic end. With this Pakistan need 136 runs to win the match.
Replying to a question by Geo News, Arthur stated that Pakistan had needed only one stable partnership to reach the target.
Sri Lanka scored 419 in its first innings, which included a ninth test century from Dinesh Chandimal.
The wickets continued to tumble as Shan Masood (7) and Babar Azam (3) too fell without making any significant contribution. He edged Nuwan Pradeep behind for 28. No matter what label is put on it, his sleight of hand was the difference as Sri Lanka upset most informed expectations on a remarkable final day at the Zayed Cricket Stadium. Losing Azhar Ali early was a big blow.
"I can't remember the last time we were bowled out for less than 100". He mentioned that the wicket of Azhar Ali was the turning point in the match. As a result, Sri Lanka folded for 138.
Niroshan Dickwella remained defiant, however, and when Pakistan's batsmen then hit nearly immediate trouble it became clear the Sri Lanka wicketkeeper's unbeaten 40 could well be significant.