David Miller struck two consecutive sixes in the final over to help South Africa edge Sri Lanka by four wickets in a thrilling but low-scoring match in Sharjah.
Needing 15 in the last over for their second Super 12 win, the left-hander Miller deposited the second and third balls from paceman Lahiru Kumara over the legside boundary to help South Africa chase down a 143-run target with one ball to spare.
Kagiso Rabada also hit a six and a four in an unbeaten 13 off seven balls, giving able support to Miller, who smashed 23 off 13 balls.
“I was a bit tense,” said Temba Bavuma, the South Africa captain. “But I had lot of confidence in the fact that David was there. David hadn’t done that for a long time for us and it was a good time coming. He’s probably got the most beautiful swing I’ve seen from a batter, it’s almost like a golf swing.”
The duo got together with South Africa looking all at sea in their chase after the Sri Lanka leg-spinner Wanindu Hasaranga completed a hat-trick across two overs.
The 24-year-old Hasaranga dismissed Aiden Markram with the final ball of his third over and returned for his last over to send back the South Africa captain Temba Bavuma, who top-scored for his side with 46, and Dwaine Pretorius for the hat-trick.
South Africa welcomed Quinton de Kock back to the side after the wicketkeeper-batter skipped the win against West Indies after opposing taking the knee in support of the Black Lives Matter movement.

The wicketkeeper-batter was back in the Proteas XI for the Super 12s group one fixture, with Heinrich Klaasen the player to make way. De Kock had withdrawn from the team to face the West Indies on Tuesday after he rebuffed a directive from the board for all players to take the knee during the rest of the tournament.
He later released a statement where he insisted he was not racist but felt “his rights were taken away” in regard to being told to take part in the anti-racism gesture but had a change of heart following clear-the-air talks with the board.
Regardless De Kock did not last long at the crease, however, and along with his opening partner Reeza Hendricks was out to fast bowler Dushmantha Chameera in a double blow for South Africa in the fourth over.
Earlier, the left-arm spinner Tabraiz Shamsi and all-rounder Pretorius picked up three wickets each as Sri Lanka were bundled out for 142 on the final delivery of their innings after they were put in to bat.
Opener Pathum Nissanka played the anchor role before opening his shoulders to lift the scoring rate during his 58-ball knock of 72.
The Spin: sign up and get our weekly cricket email.
Nissanka added 41 during a brisk second-wicket stand with Charith Asalanka but the latter’s run out after a 14-ball 21 pegged back Sri Lanka.
Shamsi, the top-ranked bowler in the format, then spun a web around the Sri Lanka batters, sending back Bhanuka Rajapaksa, Avishka Fernando and Wanindu Hasaranga to reduce them to 91 for five. Pretorius then carved through the middle and lower-order batting, picking up three wickets including that of Nissanka, to restrict them.
“It’s really hard for us after this game,” the Sri Lanka captain, Dasun Shanaka, said. “But still we got a lot of pride in us, so next two games we hope to win and keep our pride.”