Sri Lanka won the toss and Dimuth Karunaratne sent South Africa into bat. South Africa could not have had a worse start when Fernando dismissed Elgar for a duck in the second over. Four overs later Amla was caught behind off the bowling of Lakmal and Markram fell to Fernando an over later. A 72 run partnership between Temba Bavuma and Faf du Plessis gave South Africa a fighting chance to get a good session, but the captain was then dismissed just before Lunch by Rajitha. South Africa would be dismissed for 235 with de Kock top scoring with a day saving 80.
Sri Lanka could not get a better start than South Africa with Thrimanne caught behind for a duck off the bowling of Dale Steyn. Play had to be stopped due to bad light with Sri Lanka ending the day on 49-1. Dimuth and Fernando unbeaten on 28 and 17 respectively.
South Africa struck early with Dale Steyn and Vernon Philander dismissing both the overnight batsman, both falling to LBW. Kusal Perera was the only Sri Lankan batsman who looked comfortable but would fall to Dale Steyn after he got to his half-century to give Dale Steyn his fourth wicket. Sri Lanka were bowled out for 191 to trail by 44 runs.
South Africa put up a 36 run opening stand before Rajitha dismissed Markram for 28. Sri Lanka continued the momentum in the last session of the day dismissing Amla, Bavuma, and Elgar before close of play, but still trailed by 170 runs at stumps.
De Kock continued with his good form the first innings scoring 55 before being trapped LBW by Embuldenya for his third wicket. The South African skipper continued from where de Kock left from before being trapped in front by Fernando for 90. No significant partnership came afterwardss with Embuldenya picking five wickets and Fernando taking four wickets. South Africa were dismissed for 259 with a lead of 303.
Sri Lanka got to a good start before Rabada got a break through when knocked over Thirimanne. An over later Philander trapped the Sri Lankan skipper LBW, the second time in the match. Day 3 was cut short because of bad light Sri Lanka trailing by 221.
With the match poised in favour of South Africa, the Proteas were confident to defend their home record. Dale Steyn got two wickets in three deliveries and it looked to be an easy job for the South African bowlers. Kusal Perera got to his half-century but kept on losing partners on the other end. Maharaj got two wickets in as many balls with Sri Lanka still needing more than 80 runs to win. South Africa needed a wicket to win but Sri Lanka needed 79 runs which looked like a nearly impossible task. Perera made sure the number 11 batsman faced as few balls as possible smashing Steyn for a couple of sixes on the way and reaching his career-best score of 153*. Sri Lanka won by one wicket.