Centuries from Younis Khan and Asad Shafiq made sure Pakistan reached stumps on day one of the second Test in a reasonable position, after recovering from a disastrous start to post 253 for five.

Pakistan had been deep in the mire at lunch, sitting on 60 for four as the South African pace attack once again used the new ball to full effect on the green wicket, with clouds overhead.

It wasn't the 49 all out they experienced in Johannesburg, but Morne Morkel's two wickets, and one each for Dale Steyn and Vernon Philander, in the morning session saw the visitors on 33 for four at one stage.

But Younis and Shafiq, both scoring 111 though the latter was unbeaten, were superb for much of the day, resisting all efforts to remove them until Younis fell to the new ball just before the close.

The first wicket fell with the score on 10, when Philander induced the outside edge off Nasir Jamshed after seven overs of sustained pressure. Mohammad Hafeez was next to go, the score on 21, caught in the slips by Graeme Smith off Steyn.

Morkel's two wickets both fell with the score on 33, as Azhar Ali departed for four and Misbah-ul-Haq recorded a duck.This left Younis and Shafiq to knuckle down for the rest of the session, Younis on 24 and Shafiq on 11 at the break.

The afternoon saw the Pakistanis continue their battle, giving up few chances to an increasingly frustrated Proteas attack, though there were one or two edges off Robin Peterson that narrowly failed to carry to a fielder.

Both batsmen went at a strike rate of around 40, hardly lighting up the ground, but they recorded their half centuries just before the tea break to polite applause, having done well to deny the hosts a wicket in the session.

The evening session was a brisker affair for the batsmen as they added 120 runs to the score. They kept pace with each other and recorded their centuries just deliveries apart, while facing a similar number of balls.

Steyn thought he had Khan's wicket in the 81st over, with the brand new ball, but the review showed he had edged it onto his pads and the out decision for LBW was overturned.

Philander finally got the breakthrough six overs later, Younis caught behind. It originally looked like he had been given LBW, but the review showed he had edged it and De Villiers took a sharp low catch. He was the only one who seemed to pick up on the edge though.

SArfraz Ahmed was still on zero at stumps, as Pakistan breathed a sigh of relief at thwarting the Proteas for most of the day.

South Africa: Graeme Smith, Alviro Petersen, Hashim Amla, Jacques Kallis, AB de Villiers, Faf du Plessis, Dean Elgar, Vernon Philander, Robin Peterson, Dale Steyn, Morne Morkel

Pakistan: Mohammad Hafeez, Nasir Jamshed, Azhar Ali, Younis Khan, Misbah-ul-Haq, Asad Shafiq, Sarfraz Ahmed, Umar Gul, Saeed Ajmal, Tanvir Ahmed, Mohammad Irfan