Dale Steyn claimed 4-25, including three in an over, as South Africa won their World Twenty20 warm-up match against New Zealand by nine runs.
Set a target of 187 at the Colts Cricket Club in Colombo, New Zealand finished short on 177-8 despite skipper Ross Taylor's 75 off 42 balls.
Taylor and Rob Nicol put on 94 from 61 deliveries for the fourth wicket to take the Black Caps from 49-3 in the sixth over to 143-3 in the 16th.
But Lonwabo Tsotsobe (1-24) had Taylor caught by Faf du Plessis and Steyn followed up by removing Nicol (37), Neil McCullum (14) and Doug Bracewell (4) in the penulimate over of the innings.
Earlier, South Africa captain AB de Villiers top scored with a 30-ball 54 in his side's total of 186-6 after they had been asked to bat.
The Proteas start their World T20 campaign against Zimbabwe in Hambantota on September 20, while New Zealand take on Bangladesh in Pallekele in their Group B opener the following day.