Cape Town - Pakistan finally showed some fight with the bat at Newlands in the middle session on day three of the 2nd Test against the Proteas at Newlands.
The visitors are still a long way away from saving the match and the series, but at tea they were 177/3 still 77 runs away from setting South Africa a target.
SCOREBOARD: Proteas v Pakistan, 2nd Test
Shan Masood, promoted to the top of the order for the second innings, was out for a well-played 61 just before tea, having shared a 132-run stand with Asad Shafiq (73*) for the third wicket.
Dale Steyn (2/49) was the main who got the all-important breakthrough for the South Africans as masood edged through to Quinton de Kock behind the stumps.
The pair came agonisingly close to batting through the entire session as the Proteas seam quartet toiled for the first time in the series.
An extended spell from Vernon Philander after lunch yielded no reward for the hosts, though the 33-year-old did have Masood given out LBW when he was on 24 only for a review to reveal that the ball was sliding down leg.
Duanne Olivier, meanwhile, came crashing back down to earth and has been expensive throughout the day, carding figures of 0/61 from his 10 overs.
Olivier again utilised the short ball, but the this time around Pakistan had answers and both batsmen pulled, hooked and left impressively.
Where Masood was a pillar of strength with a resolute defence for large parts, Shafiq took the attack to the bowlers and reached his 22nd Test half-century in just 56 balls, carving out seven boundaries and a six.
Masood's 50 would take 98 deliveries and over two-and-a-half hours as he further solidified his position as Pakistan's best batter against the quicks in the series so far.
In the first session of the day, it looked like it would be another case of wickets tumbling at Newlands.
At lunch, Pakistan were 37/2 in their second innings, still 217 runs away from making the hosts bat again.
In total, six wickets fell in the first session of the day.
Pakistan, and Mohammad Amir (4/88) in particular, were on the money as South Africa resumed their innings on third morning on 382/6 looking to build on their lead of 205.
Amir, though, had other ideas and a fine spell of fast bowling saw him snap up the wickets of Quinton de Kock (59), Vernon Philander (16) and Kagiso Rabada (11) in quick succession.
Shaheen Afridi removed Dale Steyn (13), who took a nasty blow to the helmet from Amir, and the Proteas were all out for 431, adding just 49 to their overnight score to give them a first innings lead of 254.
Pakistan coach Mickey Arthur had said on Friday evening that he wanted his batters to show more fight in their second innings, and that has been the case so far.
Masood's opening partner Imam-ul-Haq, though, did not offer any resistance.
He was out for just 6 when he played a loose shot at a Steyn delivery that was snapped up by Dean Elgar at third slip.
Azhar Ali then came to the wicket and, with Masood, offered a short-lived glimmer of hope for Pakistan in a 17-run stand for the second wicket.
That was until Kagiso Rabada was brought into the attack, at second-change, and struck with his very first ball.
The delivery stayed low, and the under-performing Ali was trapped dead in front, out LBW for 6.