Cape Town - South Africa took seven wickets in a dramatic final session on Saturday to close in on victory against Pakistan in the second Test at Newlands.
On Sunday morning, Faf du Plessis' men will need 41 runs to take an unassailable 2-0 lead in the series in what will be the seventh Test series in a row that the Proteas have won at home.
SCOREBOARD: Proteas v Pakistan, 2nd Test
The day ended in almost farcical fashion as the Proteas tried, and failed, on numerous occassions to end the Pakistan second innings and get over the line.
The last wicket eventually fell at 18:01 as Pakistan were bowled out for 294, but the umpires opted against bringing the sides back on for another half-an-hour and South Africa will now have to wait until Sunday morning to claim the win.
Having taken the last four South African wickets in the first session of day three for only 47 runs, Pakistan then set about giving an improved account of themselves with the bat despite a massive first-innings deficit of 254.
They didn't get off to the best start losing Imam-ul-Haq (6) and Azhar Ali (6) quickly, but a 132-run stand between Shan Masood (61), who had promoted to the top of the order, and Asad Shafiq (88) restored some much-needed credibility to Pakistan's series so far.
Both batsmen were superb, showing fine judgement throughout the middle session as the Proteas fast bowlers toiled for the first time in the series.
Masood was out caught behind just before tea off Dale Steyn (4/85), who had found some rhythm from the Wynberg end.
At that stage, Pakistan were 95 runs behind with seven wickets left and looked likely to set the Proteas a score.
Babar Azam (72) showed plenty of fight, but the big wicket of Shafiq fell when Vernon Philander (1/51) picked up his first of the innings with a beautifully directed delivery that forced a prod from the batsman before nipping away slightly and finding the edge.
What Pakistan didn't need was the type of knock that Fakhar Zaman (7) played after being dropped down to No 6 in the order.
The left-hander threw everything at a short ball from Kagiso Rabada (4/61), but could only succeed in top edging back to the bowler, who took a good catch in the swirling wind.
The Pakistan resistance crumbled after that.
Skipper Sarfraz Ahmed (6) was out LBW to Duanne Olivier (1/84) before Steyn got back into the act by removing Amir (0) with a vicious bouncer that he could only glove through to Quinton de Kock.
Babar reached his 50 off just 55 balls as he chased down the deficit, but Steyn got the eighth wicket with another bumper that Yasir Shah (5) top edged to substitute fielder Zubayr Hamza at the finest of third man.
With Steyn hunting a 27th five-wicket haul in Test cricket, and his first since August 2016 against New Zealand at Centurion, the end was near for the visitors.
There was a frustrating period for the Proteas, though, as they hunted the win and tried desperately to get the match over within three days.
Babar was holding up an end, keeping Mohammad Abbas off strike, but he eventually perished 14 minutes before 18:00 when he edged Rabada to Hashim Amla in the slips.
Then, at 17:51, there was drama when Abbas launched Philander into the air to be caught by Rabada at mid-off.
The Proteas sprinted off the field, with Dean Elgar and De Kock (Aiden Markram was injured after crashing into the advertising boards earlier) rushing to get the pads on, but the umpires were forced to bring everyone back on when replays revealed that Philander had in fact bowled a no ball.
The last wicket did eventually fall when Shaheen Afridi (14) was caught by Philander off Rabada, but the umpires called stumps as a frantic session came to an end.