Fast bowler Lungi Ngidi took three wickets in his last two overs as South Africa snatched a thrilling one-run win in the first Twenty20 international against England at Buffalo Park.
Jason Roy and captain Eoin Morgan hit half-centuries for England and they looked well on the way to chasing down South Africa's total of 177 for eight.
But the match changed dramatically in the last three overs as England lost six wickets for 24 runs to finish on 176 for nine on Wednesday.
"You run in as hard as you can and hit your length. All of a sudden their team was on the back foot," said Ngidi who was man of the match for his 3-30.
"It was a very fast-paced game, but it's about how you bounce back. I didn't panic under pressure, they seemed to be cruising but my job was to get wickets."
England needed just seven to win off the last over but Ngidi dismissed Tom Curran and Moeen Ali while conceding only five runs.
Adil Rashid was run out off the last ball, trying for an improbable second run which would have tied the scores.
More From This Section
He couldn't beat a calm return from midwicket from veteran fast bowler Dale Steyn.
South Africa captain Quinton de Kock pointed out both teams struggled to score freely towards the end of their innings as the ball got softer and the bounce lower.
"We knew if we made sure we kept to our basics that we could win," he said.
"It was an outstanding game of cricket," added Morgan.
"Experiences like this, particularly with the (T20) World Cup around the corner, are so valuable. Both teams were under pressure. Both teams gave it everything."
Both innings followed a similar pattern. Both teams scored 68 runs in the first six-over power play and both had scored 113 runs after 12 overs before slowing down in the closing overs.
Opening batsman Roy was brutal in reaching his fifty off 22 balls on the way to scoring 70 off 38 deliveries with seven fours and three sixes.
Morgan seemed set to take his team to victory, hitting Beuran Hendricks for two fours and a six in the penultimate over before holing out off the last ball of the over after making 52.
Earlier, De Kock (31) and Temba Bavuma (43) got South Africa off to a fast start, putting on 48 for the first wicket off 26 balls.
Rassie van der Dussen (31) joined Bavuma and the pair added 63 for the second wicket off 41 deliveries before Van der Dussen fell to Ben Stokes and the innings lost momentum.