A gritty South African tail fought off Sri Lanka's spinners to snatch a nerve-jangling draw in the second Test and seal a historic 1-0 series win on the island.
The series victory propelled South Africa to the top of world Test ranking ahead of Australia and also ended their 21-year-old jinx in Sri Lanka where they last won a Test series in 1993.
South Africa had won the opening Test in Galle by 153 runs to go 1-0 up in the two-Test rubber.
Also Read
Chasing a target of 369, the visitors were reeling at 148-8 but tailenders Vernon Philander (27 not out) and Imran Tahir (four not out) hung on in the final nine overs to finish on 159-8.
"It started raining a bit so it took a few overs out," said Hashim Amla, who won his first series as South African captain.
"It was a tough battle. Lasting 110 overs on that wicket with quality spinners was credit to the guys.
"When we conceded 400 in the first innings, that was a setback, and then we were 13 for two. But it set it up nicely for the end."
For Sri Lanka, it was only their second home series defeat since 2006.
The South Africans were booed by the small but noisy crowd at the SSC ground after Tahir indulged in some time wasting tactics towards end of play.
Starting the day at 38-1, South Africa added just 121 runs off 94 overs, opting for defensive batting rather than press for a win.
To their credit, the Sri Lankan spinners gave it their all but constant rain breaks and sloppy fielding put paid to their efforts.
Left-arm spinner Rangana Herath led the pack with 5 wickets from 45 overs while giving away just 40 runs. The stocky 36-year-old was well supported by off-spinner Dilruwan Perera who grabbed 3-60.


