An unbeaten 87-run fourth wicket partnership by the captain Misbah-ul-Haq (58 not out) and Azhar Ali (28 not out) ensured Pakistan secured a second draw against South Africa in the two-Test series at Zayed Cricket Stadium.
Pakistan was 153 for three, having been set a stiff target of 353 for victory, when the South Africa captain Jacques Kallis agreed to end the game at the drinks break before the scheduled close.
Earlier, South Africa had added another 30 runs at the cost of one wicket to its overnight score of 173 for four before leaving the opposition with 82 overs to go for victory.
Needing to score at a little over four an over, Pakistan's openers were going strong but suffered some anxious moments in the second session when they lost three wickets at the lunch score of 66 including that of Younus Khan for a second ball duck.
Taufeeq Umar departed on the ninth ball after the lunch break to Johan Botha. Paul Harris struck twice in the next over as Hafeez and Khan left, all trapped leg before in the space of eight deliveries.
Pakistan then recovered with Misbah and Azhar grinding out the next 189 minutes to close the door.
Misbah led by example, as he did in the first Test when he scored 76. The captain struck six fours in his first 25 runs to blunt the hopes of the Proteas, who charged in with aggressive field settings.
Azhar, on the other hand, ground the bowlers down, using 135 balls for his 28, missing the chance to hit a fourth successive half-century in this series.
Once Pakistan steadied the ship, Misbah reached his third straight half-century in 90 balls with nine boundaries. One pull shot hit Hashim Amla at short leg and the in-form South Africa batsman had to leave the field with for treatment on his left hand.
South Africa lost the services of captain Graeme Smith on Tuesday with a fractured thumb and he is a doubtful starter for the next series against India from December 16.
See the action how it unfolded below.