Imran Farhat marked his recall with 93 as Pakistan kept the one-day series with South Africa alive with a nervy three-wicket victory in Kingsmead.
Playing his first 50-over match for his country since last June, Farhat's 144-ball knock put the tourists on course to chase down the Proteas' below-par total of 234-9 at Sahara Stadium.
Pakistan's cause with the bat had not been helped by Mohammad Hafeez being given out obstructing the field without having scored a run. He was alleged to have blocked a throw to the non-striker's end.
However, skipper Misbah-ul-Haq made 80 in a fourth-wicket stand of 153 that helped Pakistan recover from an early wobble that saw them slip to 33-3.
In the end, though, they rather limped across the line. Misbah and Shahid Afridi both fell in the same Robin Peterson over while Farhat perished with nine required, steering a short ball from the excellent Dale Steyn (1-26) up in the air for Farhaan Berhardien to catch at point.
Wahab Riaz was then run out but Saeed Ajmal and Shoaib Malik steered the visitors home with eight balls to spare, levelling matters in the series at 2-2 and setting up a decider in Benoni on Sunday, live on Sky Sports.
Just like their opponents, South Africa had early setbacks at the start of their innings, losing two wickets to the first two deliveries of the match.
Seamer Mohammad Irfan got proceedings off to spectacular start when he had Hashim Amla caught behind, then followed that up be cleaning up Colin Ingram with a Yorker.
At one stage the hosts were 38-4 before captain AB De Villiers and David Miller led a recovery mission, putting on a stand of 115 that was eventually ended when the latter was adjudged lbw to Ajmal for 67.
The same bowler dismissed De Villiers for 75 to finish with figures of 3-42, while team-mates Irfan and Junaid Khan also claimed three wickets apiece.
Robin Peterson did provide some late impetus with an unbeaten 25, including back-to-back boundaries in the final over, but South Africa's total never looked like being enough.