Rizwan put on an excellent 52-run stand for the sixth wicket with Faheem Ashraf (29) before the latter became Linde’s third victim, caught at backward point by Anrich Nortje just before the close.
Pakistan had been reduced to 76 for five in their second innings as South Africa’s spinners made inroads through the top order having been bowled out for 201 in another shambolic display with the bat.
Seamer Kagiso Rabada removed Imran Butt for a duck, before Abid Ali (13) fell to Keshav Maharaj (2-74), who also picked up the key wicket of home captain Babar Azam (8), trapped leg before wicket by the left-arm spinner for the third time in four innings.
When Linde (3-12 from nine overs) removed Azhar Ali (33) and Fawad Alam (12) in quick succession, the contest started swinging South Africa’s way.
They were made to pay for their profligacy in the field when they dropped Faheem and Rizwan in consecutive deliveries, but Linde’s late wicket has left the contest even.
Earlier, South Africa’s batting struggles continued. They have now passed 300 just once in their last 17 innings away from home, and again their effort was a mix of poor shot selection and inexplicable running between the wickets caused by panic.
They resumed their innings on 106 for four but lost captain Quinton de Kock (29) early as his ambitious attempt to take the attack to the bowlers saw him chop a Shaheen Afridi delivery onto his stumps.
Temba Bavuma (44 not out) and Wiaan Mulder (33) put on 50 for the sixth wicket to put pressure back on the home side, but the latter was run out attempting an unnecessary second run.Including that wicket, the tourists lost their last five for a paltry 37 runs with left-hander Rabada also run-out after being called through by Bavuma for a risky single.