Big picture
Sri Lanka would have felt they were on track for victory at the end of day three of the first Test, until Abdullah Shafique and Co swept the win from under them in the last two days. But even Sri Lanka reflected that theirs was a far-from-complete performance. If you bat first in Galle, you have to score "350 to 400 runs" to control the game, Dhananjaya de Silva had said after the match. They had made 222.
Then, in the second innings, only Prabath Jayasuriya seemed a wicket-taking threat for the majority of Pakistan's 127.2 overs at the crease, and Sri Lanka lost a match that seemed in the bag.
It wasn't quite a perfect Test for Pakistan either, but in Shafique, they now have a Test batter that right now is putting up bigger numbers than even Babar Azam. Their weakness, like Sri Lanka's, is the bowling attack, which is a strange thing to say about a Pakistan side.
Their seamers are excellent on pitches that offer them something, but in Galle, no significant reverse swing has been seen for three Tests running. Aside from Mohammad Nawaz, their spinners weren't especially consistent in the second innings either.
As always, with these teams, there is the problem of them not playing remotely as expected from one match to another. On the surface, it seems as if Pakistan should ride on the momentum of a monumental chase, and put substantial pressure on the hosts.
But series between these teams frequently surprise. Maybe, in this one - and this would be the biggest surprise of all, given the way the first Test went - both teams will take all their chances.
Form guide
(Last five matches, most recent first)
Sri Lanka LWLWD
Pakistan WLDDW
In the spotlight
Angelo Mathews will be playing his 100th Test. It has been quite a career. He has batted all day to save a Test away from home. He has hit plenty of big innings in the company of the tail, most memorably his 160 at Headingley that helped turn a dire situation into a victory. He has also had a public fight with a coach, and plenty of minor humiliations, and has spent months away from the side owing to leg injuries, but has also been part of some of Sri Lanka's greatest Test victories.
He only gets picked for Tests now, which means this might be his last international until March next year. A big contribution would be the perfect way to celebrate the occasion.
Abdullah Shafique, just 22 years old, has an average of 80, and a great fourth-innings knock to his name. There are plenty of batters who have 12-year Test careers without an innings as impressive as the 160 not out he just played in Galle. Shafique did it in his 11th innings. What was most impressive about the knock was that it wasn't a gamble.
He backed his defence, saw out 408 balls, even if he was occasionally - but not outrageously - fortunate to survive. And in partnerships with batters who have played a lot more cricket than him, Shafique seemed like the more accomplished player.
Pitch and conditions
It is Galle, so it will turn. And it is July, so at some point, the weather will impose itself. It has been nine years since there has been a draw at this venue, so a result is always likely.
Team news
Sri Lanka have got Pathum Nissanka back in the squad, but because Oshada Fernando has scored runs, he might retain his position. Meanwhile, the injured Maheesh Theekshana has been ruled out. So Dunith Wellalage, the left-arm spin-bowling allrounder, is likeliest to make a debut.
Sri Lanka (possible): 1 Oshada Fernando, 2 Dimuth Karunaratne (capt), 3 Kusal Mendis, 4 Angelo Mathews, 5 Dhananjaya de Silva, 6 Dinesh Chandimal, 7 Niroshan Dickwella (wk), 8 Ramesh Mendis, 9 Dunith Wellalage, 10 Prabath Jayasuriya, 11 Asitha Fernando
Pakistan may bring in left-arm spinner Nauman Ali for Shaheen Shah Afridi, who is out with a knee injury. At times in the first Test, they seemed to have too many quicks, given the state of the pitch. Afridi had taken four wickets in the first innings of that match, but Pakistan may be going in with a better combination this time.
Pakistan (possible): 1 Abdullah Shafique, 2 Imam-ul-Haq, 3 Azhar Ali, 4 Babar Azam (capt), 5 Mohammad Rizwan (wk), 6 Agha Salman, 7 Mohammad Nawaz, 8 Nauman Ali, 9 Hasan Ali, 10 Yasir Shah, 11 Naseem Shah
Stats and trivia
Mathews needs a further 124 runs to get to 7000 in his career. When he gets there, he will be the third Sri Lankan to the milestone after Kumar Sangakkara and Mahela Jayawardene.
Pakistan have won successive Tests in Galle, having also won at the venue in 2015. If they win again, they will become the second visiting team after England to win three in a row at the venue.
With the victory in the first Test, Pakistan have put themselves at third on the World Test Championship table, with 58.33 percentage points. Sri Lanka have slipped to sixth.