Hashim Amla scored his 20th test century as South Africa finished the opening day of the series on 245-8 against Pakistan in Abu Dhabi.
After electing to bat first, captain Graeme Smith soon saw his side facing a struggle as South Africa slumped to 43-3.
Alviro Petersen fell for just six, Smith soon followed his opening partner back to the pavilion when he was caught behind by wicket-keeper Kamran Akmal for 15.
Smith was originally given not out before television umpire Ian Gould overruled the decision, with the faintest of noise being heard from the replays.
Opening bowler Mohammad Irfan picked up both wickets as he produced an impressive spell and ended with figures of 2-42 for the day.
Other opening bowler Junaid Khan claimed the big wicket, dismissing Jacques Kallis for five, falling caught behind off an inside edge.
Amla continued to dig deep and lead South Africa to a recovery and was supported well by A.B de Villiers.
The experienced pair formed a stand of 61 before de Villiers was run out by Younus Khan at the slip. Following an inside edge, Khan threw the ball to keeper Akmal who whipped off the bails, with de Villiers out of his crease.
J.P Duminy continued the fightback and scored a valuable 57 off 94 balls to take South Africa to 199-5.
Pakistan fought back through a 34 year-old débutante. Zulfiquar Babar removed three batsmen in quick succession. Firstly the spinner removed Duminy followed shortly after by Faf du Plessis (1) and Robin Peterson (5).
Babar produced figures of 3-89 but couldn't do anything to stop Amla from bringing up an important century, coming off 201 balls.
Saeed Ajmal used a successful review to remove Vernon Philander for three as Amla will be joined by Dale Steyn (13 not out) on day two to try and take South Africa up to 300.