Dean Elgar and Hashim Amla hit half-centuries as South Africa beat Pakistan by six wickets inside three days in the first Test at SuperSport Park on Friday.
The pair survived some early scares and a controversial umpiring decision and put on 119 for the second wicket before Elgar was caught behind off part-time medium-pacer Shan Masood for 50.
"They have brought some very good bowlers," said Elgar. "It could have gone either way but luck was on our side."
Amla finished a year in which he seldom found top form by making 63 not out.
The value of the partnership between Elgar and Amla was shown as Theunis de Bruyn and captain Faf du Plessis both fell cheaply before Temba Bavuma swept Yasir Shah for four to take South Africa past their target of 149 shortly before tea on the third day.
"Great Test, and good to go one up," said du Plessis whose duck meant that he and Sarfraz Ahmed go into the history books as the only captains ever to record a 'pair' in the same Test.
Sarfraz admitted that Pakistan were "very disappointed" at how they had squandered a strong position after tea on the second day.
Pakistan reached 100 for one in their second innings, a lead of 58 in a low-scoring match, but lost nine wickets after tea to be bowled out for 190.
"We had an opportunity to capitalise but we lost too many wickets in one session," said Sarfraz. "That cost us the match."
Pakistan made an ideal start on Friday when Hasan Ali trapped Aiden Markram leg before wicket before a run had been scored.
Hasan and Mohammad Amir did not concede a run off the bat until Amla clipped Hasan for four in the sixth over.
There were two crucial incidents with the total on 16, either of which could have swung the game in Pakistan's favour.
Amla, on eight, was dropped by Fakhar Zaman at third slip off Hasan when he slashed hard at the ball, which flew at chest height to the fielder. In the next over, Elgar, on four, edged Shaheen Shah Afridi low to first slip where Azhar Ali appeared to take a diving catch.
On-field umpires Bruce Oxenford and Sundaram Ravi conferred before referring to television umpire Joel Wilson with a 'soft' signal of out, indicating they thought it was a clean catch.
After looking at several replays, including super-slow close-ups, Wilson ruled the ball had bounced and Elgar was reprieved.
The decision clearly astonished the Pakistan players and coach Mickey Arthur was seen leaving his place on the players' balcony and going to the adjacent office of match referee David Boon.
"The third umpire thought it bounced," said Sarfraz. "The on-field umpires thought it was out and for me it was a clear catch."
Television commentator Michael Holding criticised his fellow West Indian Wilson.
"I'm convinced he was out," said Holding. "I think the third umpire made a mistake."
Sarfraz said it was a similar situation to that in which Indian captain Virat Kohli was given out in the second Test against Australia in Perth, where television umpire Nigel Llong upheld the on-field decision, also after a "soft signal" and multiple replays.
South African fast bowler Duanne Olivier was named man of the match for his match return of 11-96.
"He (Olivier) reminded me of what (Australia's) Mitchell Johnson did to us a few years ago, making it very uncomfortable for the batsmen," said du Plessis.
Johnson took seven for 38 in an innings at the ground in 2013/14.
With fit-again Vernon Philander set to return to the side, there is no guarantee that Olivier will play in the next Test at Newlands.
"Vernon in Cape Town is like peanut butter and syrup, he should be there," said du Plessis.
"On this ground Duanne bowled the perfect way if you've got a bit of pace.
"Whether the same thing would work going to Newlands you would have to look at conditions and which are the right lines and lengths to bowl. But it would be very hard to leave him out."
Sarfraz said fast bowler Mohammad Abbas and batsman Haris Sohail were both expected to be fit for Pakistan after missing the first Test because of injury.
The second Test begins in Cape Town on January 3.
Centurion, South Africa | AFP