Durban - Kusal Perera carried Sri Lanka to a sensational one-wicket win on the fourth day of the first Test against South Africa at Kingsmead on Saturday as he hit a career-best 153 not out.
Perera and Vishwa Fernando put on an unbeaten 78 in a last-wicket partnership to secure only Sri Lanka's second win in 14 Test matches in South Africa.
Victory seemed unlikely when the ninth wicket fell with the total on 226, with the tourists chasing a target of 304.
But the left-handed Perera successfully farmed the strike, with South African captain Faf du Plessis persisting with wide-spread fields for the in-form batsman, while Fernando only had to face 27 balls during a 96-ball partnership.
Perera was on 86 when the ninth wicket fell but managed to keep most of the strike and to hit some telling blows in an innings of 200 balls which included 12 fours and five sixes.
"It was a superman effort," said Du Plessis. "He (Perera) deserves all the accolades."
South Africa took the second new ball with the total on 263 but still kept most of their fielders on the boundary for Perera, who hit sixes off both Dale Steyn and Kagiso Rabada before slashing Rabada to third man for the winning boundary.
Perera, who came into the match with a career batting average below 30 and with his only previous century in 14 previous Tests having been made against Zimbabwe in Harare two seasons ago, shared three important partnerships.
He put on 58 for the fourth wicket with debutant Oshado Fernando (37) and 96 for the sixth wicket with Dhananjaya de Silva (48) before his extraordinary association with Vishwa Fernando.
"I'm a little tired now, I don't know what to say," said Perera when he received the man of the match award. "I did my part but we are winning as a team."
The stand with Oshado Fernando was broken by Dale Steyn, who had Fernando caught at second slip by South African captain Faf du Plessis. Two balls later he caught Niroshan Dickwella off his own bowling.
Sri Lanka were still a distant 194 runs short of their target when Perera was joined by De Silva, Sri Lanka's last recognised batsman.
South Africa, who were without opening bowler Vernon Philander because of a strained left hamstring, struggled for the next two hours as Perera and De Silva brought the target down to single figures.
Left-arm spinner Keshav Maharaj took two wickets off successive balls, dismissing De Silva leg before wicket and having Suranga Lakmal caught at slip.
The next two wickets fell quickly - but what seemed certain victory for South Africa turned into a triumph for the tourists, who are assured of at least a share of the honours in a two-match series.
The second Test starts in Port Elizabeth on Thursday.