Sri Lanka had not won a game in any format since October, having been well beaten on tours to New Zealand and Australia.
Sri Lanka's epic one-wicket victory over South Africa in the first Test at Kingsmead on Saturday was achieved on the back of what will go down as one of the country's greatest Test match innings by an unlikely hero in Kusal Perera.
The swashbuckling middle-order batsman scored 153, adding a record 78 for the final wicket with number 11 Vishwa Fernando, who batted for 73 minutes without playing a shot in anger, desperately holding the South African attack at bay.
Perera was in his second Test back in the side, with a top score of just 32 in his previous 10 innings, and was roughed up by Australia on his last outing earlier this month.
But he produced an innings of power, precision, bravery, intelligence and grit, taking blows to the body from the fierce South African pace attack and responding with a few blows of his own with the bat as the tourists chased down 304 to win.
As Sri Lanka crept closer to their victory target, Perera might have been tempted to knock the singles and play conservatively, but instead he launched at the home bowlers, hitting five sixes in his incredible innings.
The key to the last wicket stand was not only the boundaries he hit, but also his ability to keep his partner off strike. Perera and Fernando were at the crease together for 95 balls and the number 11 faced only 27 of them.
"That was a really good game. We had a tough series in Australia but we learnt well," Sri Lanka captain Dimuth Karunaratne told reporters.
"We have lost a lot of matches in last few years, so it's a proud moment for us, the team, and for me as captain.
"I think he (Perera) batted really well, getting a hundred in South Africa is not easy, against this fast bowling attack.
"Fernando also did a really good job with the ball and then he supported Kusal as well."
It was a magical moment for a side who came into the Test amid lots of turmoil with their skipper in Australia, Dinesh Chandimal, axed and reports of a rift between the board and coach Chandika Hathurusingha, who was removed as an on-tour selector.
Added to that, Sri Lanka had not won a game in any format since October, having been well beaten on tours to New Zealand and Australia.
They will now go in search of a first Test series win in South Africa when the second and final match is played in Port Elizabeth from February 21-25.