“It was a slow scoring Test match for us but I think the credit goes to the spinners and the Sri Lankan team who really made it difficult for us out there,” said Amla, 31. “There were nerves, tension, fingernails got bitten in the dressing room. It was emotionally draining to watch the guys try and save the game for us. We almost reached our breaking points.”

Amla said it was a “pleasing feeling” to win his first series as captain and see the team jump on top of world Test rankings. “But to be honest, our primary aim was not to get to number one. (Our aim) was to find a winning formula for a newish team. Not many foreign teams come to Sri Lanka and win series. So I am thankful to the team for showing so much commitment.”

South Africa are in a rebuilding phase after the retirement of their long-standing skipper Graeme Smith and legendary all-rounder Jacques Kallis. Amla was named the captain last month, becoming the first non-white player to lead the Test team in a full-time capacity.