Younus Khan and Asad Shafiq made fine centuries as Pakistan recovered from a poor start to reach 253 for five on the opening day of the second Test against South Africa at Newlands on Thursday.
Having been reduced to 33 for four before lunch, a 219-run fifth-wicket stand between Younus (111) and Shafiq (111 not out) made the South African bowlers toil in the sun after captain Graeme Smith had won the toss.
The hosts dismissed Younus shortly before the close to leave the match evenly poised.
"After the first Test we had a lot of meetings to discuss how we should play Test cricket," Younus told reporters.
"It was tough again this morning, but after we got through the new ball, if it was there to be hit, we went for it.
"I encouraged Asad to do the same and I think that helped him to relax. The wicket is much better for batting, I was a bit lucky but I hung in there. The bowlers were talking a lot to me but I just kept smiling and trying to hit the bad ball."
Pakistan first innings
M Hafeez c Smith b Steyn 17
N Jamshed c de Villiers b Philander 3
A Ali c de Villiers b Morkel 4
Y Khan c de Villiers b Philander 111
M-ul-Haq c Elgar b Morkel 0
A Shafiq not out 111
S Ahmed not out 0
Extras (lb-4 nb-3) 7
Total (for five wickets, 90 overs) 253
Fall of wickets: 1-10 2-21 3-33 4-33 5-252.
To bat: Umar Gul, Saeed Ajmal, Tanvir Ahmed, Mohammad Irfan.
Bowling: Steyn 19-7-34-1, Philander 21-8-45-2 (2nb), Morkel 16-6-37-2 (1nb), Kallis 13-2-34-0, Peterson 19-0-85-0, Elgar 2-0-14-0.
South Africa - G. Smith, A. Petersen, H. Amla, J. Kallis, AB de Villiers, F. du Plessis, D. Elgar, V. Philander, R. Peterson, D. Steyn, M. Morkel.
Smith had spoken about a "dangerous" Pakistan side following their 211-run defeat in the first Test and so it proved as Younus and Shafiq started watchfully before accelerating after tea.
Shafiq was dropped by Dean Elgar at short leg off spinner Robin Peterson when on just 24, but otherwise gave a chanceless performance in reaching his third Test century off 201 balls including 13 fours and a six.
The experienced Younus reached his hundred from 192 balls with six fours and three towering sixes off Peterson. It was his 21st in Tests and fourth against South Africa.
He was dismissed on review after an inside edge off Vernon Philander carried to wicketkeeper AB de Villiers.
"I think if we can get through the morning session tomorrow and post 350 or 400 then we have a good chance to win the Test," Younus said.
Morne Morkel was the pick of the bowlers with two for 37 from his 16 overs and Philander took two for 45. Dale Steyn deserved more than his one for 34 as he went past the outside edge on numerous occasions.
"Newlands always offers a bit in the morning, so hopefully with a new ball that is only 10 overs old we can get through them quickly," Philander said
It looked like it was going to be another batting disaster for Pakistan early on.
Nasir Jamshed (3) offered a catch to De Villiers with a loose front-foot drive off Philander, Mohammad Hafeez (17) tentatively pushing forward to a full ball from Steyn and Smith pouched the catch at first slip.
Morkel had Azhar Ali (4) caught behind by De Villiers and four balls later Pakistan captain Misbah-ul-Haq fended a rising delivery into his ribs with his gloves and Elgar took the catch at short leg.
South Africa lead the three-match series 1-0 after their victory in Johannesburg.