With six overs left in the rain-hit fourth ODI, the ball was wet, and South Africa were ahead of the game, with 43 runs to get, and five wickets in hand. So what did Sri Lanka do? They bowled as if they were playing a Test.
It sounds like an odd move, but in the situation, it turned out to be an inspired one. South Africa had David Miller - one of the cleanest strikers in the world - at the crease, and another batsman to come. Yet they could muster no more than 39 from those 36 deliveries, as Sri Lanka claimed four wickets and squeezed the visitors out in Pallekele.
Suranga Lakmal's final over was delivered with an especially unusual limited-overs field. Sri Lanka had six men on the off side and only three on the leg. Lakmal dared Miller to hit across the line, and bowled him with a cutter. His death-bowling partner, Thisara Perera, explained how the senior players had hatched this Test-match plan on the fly.
"In the 15th and 16th overs, we realised that the ball was swinging from one end," Thisara said. "The ball was still new. So we decided to bowl wicket-to-wicket from that end, and it's not easy to bat when you bowl like that. We noticed that in our innings as well. So we planned to stick to that line as fast bowlers because they [the batsmen] then have to take the risk to try and hit over the field. What we did in the last few overs was to forget about yorkers, and try to bowl a Test-match line and length. That's what worked out for us."
"The bowling had to be good because 190  is a very easy target given the wet conditions, especially after they had hit 21 in the first two overs. But somehow we won."
That South Africa were even chasing as many as 191 from their 21 overs was thanks in large part to a breakneck seventh-wicket stand between Thisara and Dasun Shanaka earlier in the evening. The pair came together with the score on 195 for 6, with just under 12 overs remaining. But instead of knuckling down to ensure Sri Lanka batted out the full 39 overs, they soon began to attack, hitting seven sixes and seven fours between them. Their partnership of 109 was Sri Lanka's best of the series, and came from only 67 deliveries.
"As soon as Dasun came, I told him that we shouldn't stop playing our shots," Thisara said. "We are both positive batsmen. We planned three overs by three overs at the start. And then after a while, we realised that we were seeing the ball well. So we decided on a target of 280, but we both batted well. Dasun was especially good at hitting boundaries, so we were able to pass 300. A 100-run partnership is not easy, because their bowlers were bowling well and we had lost six wickets already. But as soon as Dasun came, I told him let's try and hit straight in the first few overs and get ourselves set, and then see after that."
Shanaka provided the better hand in the partnership, hitting 65 off 34 balls, while Thisara made 51 off 45. It was an especially important innings for Shanaka, who had not played an ODI since November 2016. This knock may go some way towards convincing the Sri Lanka selectors that he should be part of their World Cup plans.
"Actually what I had wanted to do was to support Thisara, because he is the best death-overs batsman in Sri Lanka - he can hit a six at any time," Shanaka said of his knock. "I wanted to stay with him till the end and play that supporting role. When he started batting well, I got a few loose balls. When they tried to bowl short at him, they also bowled short at me, so I was able to hit sixes."