Babar Azam, the Pakistan captain, admitted it was "disappointing" to see his side fold as swiftly as it had either side of lunch on the final day in Galle and miss out on an opportunity to win their second successive series in Sri Lanka.
With eight wickets still in hand half an hour before lunch and rain and poor light looming, a draw seemed like it was all but secured. But three quick wickets before the interval gave Sri Lanka an opening who, spearheaded by Prabath Jayasuriya, went on to rip through the Pakistan batting line-up.
"The lower order falling cheaply was disappointing. Credit to Jayasuriya for how he bowled, he was outstanding. He was patient; in Test cricket, you need patience. He's a consistent bowler. He plugs away at a length and sticks to it. Even if he gets hit for a boundary, he doesn't deviate from his length. As a batting unit, you need patience too, and we were slightly lacking in that department. And that goes for our lower order as well."
There appeared to be no demons in the pitch to worry Pakistan when the day began. The early loss of Imam-ul-Haq was followed up by a 79-run stand across 23 overs between Babar and Mohammad Rizwan, with Jayasuriya and Mendis - who operated almost that entire time - made to look relatively harmless. Then things changed.
"Early morning, the pitch wasn't doing much," Babar said, "But after a bit of rain, the spinners began to get a bit of help which led to a few of our wickets falling early. We didn't strike up a partnership like we needed to, and whenever back-to-back wickets fall, you inevitably feel the pressure.
It was Rizwan's wicket that opened the floodgates, with the wicketkeeper-batter letting one go that carried on to take his off stump. The panic began to set in at that point and bled over into the next dismissal, when a mix-up between Fawad Alam and Babar led to the former being run-out. Agha Salman's dismissal on the stroke of lunch effectively put Babar as the sole roadblock between Sri Lanka and a huge win. When Jayasuriya trapped him in front for 81 a few overs after lunch, Pakistan's fate was effectively sealed. In the end, the last eight wickets took just 23.4 overs to fall, the disappointing fourth-innings showing a bit of a departure from Pakistan's performances of late.
"When you've chased big scores in the past, you get confidence," Babar said. "We brought that confidence into this chase. We had belief we could do it, but Sri Lanka came well prepared and bowled according to their plans. As a batting unit, we were slightly unlucky because there were plenty of soft dismissals.
"Day by day, the team is improving and the performances are improving. These conditions weren't easy but we did well in phases. We did things wrong, too, which we'll discuss. But there are lots of positives here, too. And we'll try and build on those."