Cape Town - Pakistan batsman Asad Shafiq was relieved to see his side gain some confidence with the bat in the second innings against the Proteas at Newlands on Saturday.
Pakistan were staring down the barrel on Day 3, facing a first innings a deficit of 254 on a tricky track.
The tourists, who were bowled out for 177 in the first innings, were again in trouble at lunch on 35/2.
However, a gritty third-wicket partnership of 132 between Shafiq and Shan Masood (61) was a welcome fight-back from the opposition after what has been a one-sided Test series thus far.
Shafiq's knock of 88 off 118 balls and Babar Azam's 72 lifted the changeroom as Pakistan - who were eventually bowled out for 294 - took the Test to the final innings, forcing the Proteas to score 41 for victory.
Despite the game likely a forgone conclusion, Shafiq admitted that gaining some confidence in the middle was the biggest positive from the Test thus far.
"We can take positives from this innings because (before) our batting line-up was not doing well. Now everyone is getting runs, so it's a good sign for the team. When you score, you get your confidence back so as a team it's a good sign," Shafiq told reporters in Cape Town.
"They have a quality bowling attack, they put the ball in the right areas, you have to be patient and at the same time attack.
"It's not easy batting against a South African bowling attack. They're very good and have world class bowlers. So I had to be in a positive mindset and just play my shots," he said.
Despite the controversy over the wicket, Shafiq revealed that it was much easier to bat on the Newlands pitch on Saturday.
"The wicket is a type of 'if you get in, you can get value for your shots' wicket. That was my plan, to see the first 20 balls and, if the ball landed in my zone, I would play the shots," he said.
"The pitch was easier today compared to the first and second day."
The Proteas need 41 runs to win the second Test and clinch the three-match series on Sunday.
Play starts at 10:30 and entry into the stadium is free.