Kusal Perera hit an incredible century to lead Sri Lanka to a stunning one-wicket victory over South Africa in the first Test in Durban.
With South Africa on the cusp of victory, Perera (153no) shared a record unbeaten 78-run stand with No 11 Vishwa Fernando (6no) to snatch it away from them and put Sri Lanka 1-0 up in the two-match series.
Needing 13 to reach the target of 304, Perera smashed Dale Steyn (2-71) over midwicket for six and then guided the ball to the third man boundary off Kagiso Rabada (1-97) to seal a remarkable Sri Lanka win and the third-highest successful chase at Kingsmead in Test history.
Having started the day on 83-3, Oshada Fernando and Perera took Sri Lanka up to 110 and appeared comfortable before Steyn's double strike - Fernando (37) caught at second slip and Niroshan Dickwella (0) superbly caught and bowled two balls later - rocked the visitors.
Perera and Dhananjaya de Silva steadied the innings though, batting sensibly to frustrate a South African attack shorn of Vernon Philander due to a hamstring injury, and soon after lunch the runs required dipped into double figures.
However, Sri Lanka's chances suffered a major blow with 98 runs still needed for victory as Keshav Maharaj trapped Dhananjaya (48) lbw and then had Suranga Lakmal caught at slip next ball.
Lasith Embuldeniya (4) was then bounced out by Duanne Olivier (2-35) and when Maharaj (3-71) hit Kasun Rajitha (1) plumb in front, South Africa were on the brink.
Perera refused to give in though, even after getting through to three figures and farmed the strike expertly to gradually knock off the runs required.
South Africa took the second new ball as they bid to finish off Sri Lanka but again Perera was up to the challenge, hitting a six in three consecutive overs from Steyn and Rabada before sparking wild celebrations from Sri Lanka with a boundary down to third man in the next to seal the win.
Watch the second Test between South Africa and Sri Lanka from 7.55am, Thursday on Sky Sports Cricket.