Skipper Sarfraz Ahmed shared an innings-reviving 42-run stand with Haris Sohail but when he was stumped, advancing down the wicket to Herath, Pakistan slumped to 78-6 and Sri Lanka had the upper hand.
A Test that was prefaced with a lament on both sides over the absence of heroes of the recent past was settled when a modern master took his 400th Test wicket, and bowled Sri Lanka to a stunning victory in the process.
Sri Lankan cricket captain Dinesh Chandimal.
Sri Lanka's hopes of inflicting a first defeat on the hosts at the Sheikh Zayed Stadium appeared slim after they were bowled out themselves for 138 and could therefore set Pakistan only 136 to win.
The visitors then kept chipping away at Pakistan as Dilruwan Perera and Herath got Babar Azam and Asad Shafiq respectively and suddenly Pakistan were at sixes and sevens.
Sri Lanka started fifth day of the match at 69-4 with lead of 66 runs. "We should have chased this target", said Arthur, who saw Pakistan slide to a 10th defeat in 16 Tests since he took over previous year. His compatriot Muttiah Muralithran remains the fastest bowler to pick up 400 wickets, a feat he achieved in just 72 matches. The five-for he took in Pakistan's first innings was his seventh against the team. We have played him a lot. A cautious Ali made sure Pakistan do not concede a big lead in the first innings, having hit only one boundary in his 26th Test half century.
Chandimal added 134 for the fifth wicket with Niroshan Dickwella, who made a career-best 83, before frustrating Pakistan further with a 92-run stand for the sixth wicket with Dilruwan Perera, who made 33.
"We discussed at lunch break that we needed one good partnership and wanted that up front, but didn't get that".
The second Test - a day-night one - starts in Dubai from Friday. If a result appeared out of the question at that point, it appeared all but certain once the Sri Lankans had crumbled to 138 all out in their second innings. All credit should go to the people behind me, from my parents to the team and the supporting staff. "It took me a long time (to make runs), but that is how you play on this pitch and I'm happy". "There was something for the spinners so I got this success", he said. While most of the other Sri Lankan batsmen succumbed to the extreme conditions, Chandimal continued his marathon innings with a rock-solid defence and a monk-like temperament.
For the home side to clinch the Test, they perhaps need Sarfraz to play a substantial knock.