Pakistan propelled by magnificent centuries from Younis Khan (111) and Asad Shafiq (111 not out) reached 253 for five at close on the first day of the second Test against South Africa at Newlands on Thursday.
The pair came together when Pakistan were reeling at 33 for four in the first hour after being put into bat by Graeme Smith leading South Africa for the 100th time.
Younis and Shafiq featured in a record fifth wicket stand of 219 off 71 overs to frustrate the South African attack for more than two and half sessions batting with determination pacing their innings beautifully.
"After the first Test we had a lot of meetings to discuss how we should play Test cricket," Younis 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."
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," Younis 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.
Younis Khan goes after a magnificent knock of 111 being adjudged caught behind by AB de Villiers off Vernon Philander following a decision referral after a leg before appeal was overturned.
Pakistan are 253-5 after 88 overs having been put into bat in the second Test against South Africa at Newlands on Thursday.
Younis Khan survives after being adjudged leg before off Steyn's fourth delivery with the second new ball but the decision is overturned as Pakistan are successful with the review.
To add insult to injury, Younis Khan whips Steyn to square leg boundary to end the over.
Dale Steyn has been handed the second new ball as South Africa make a bid to break Pakistan's fifth wicket stand.
Asad Shafiq completes his third Test century, the first against South Africa, by cutting Elgar past backward point for his 13th boundary.
Shafiq's ton which came off 201 balls also contained one six.
The 200 partnership for the fifth wicket between Younis Khan and Asad Shafiq comes off 375 balls.
Younis Khan completed his 21st Test century and fourth against South Africa by sweeping Dean Elgar for a couple.
Younis Khan's century which came off 192 balls contained six boundaries and three sixes.
Younis Khan has hoisted Peterson for his third six to move ahead of Asad Shafiq who is on 95.
Asad Shafiq caressed a delivery from Kallis to third man for his 12th boundary.
Younis Khan has stepped out to attack Peterson by hoisting him for his second six as Pakistan look to boost their tally before the second new ball is taken.
Younis Khan and Asad Shafiq pick up a couple of boundaries of Peterson after the drinks interval in the final session.
Asad Shafiq has hoisted Peterson over the bowler's head for a huge six to bring up the 150 partnership for the unbroken fifth wicket which is the highest for any wicket by Pakistan in South Africa.
He follows it up by thumping the next ball to the point boundary as Pakistan launch an offensive with the second new ball due in 10 overs.
Asad Shafiq survives a scare after giving the charge to Peterson but his lofted drive fell just short of Morkel at mid on.
Asad Shafiq is on song now and hitting boundaries at will pulling Kallis to midwicket with disdain.
Asad Shafiq is batting with more fluency attacking Vernon Philander by despatching him twice to the legside boundary with sweetly timed shots to bring up the 150 of the Pakistan innings in the 61st over.
Younis Khan has hit the first boundary after the tea interval slamming Morkel wide of backward point as Pakistan resumed on 133-4.
Younis Khan and Asad Shafiq led a spirited fightback with an unbroken fifth wicket stand of 100 as Pakistan reached 133 for 4 at tea in 57 overs in the second Test against South Africa at Newlands on Thursday.
Khan was unbeaten on 54 and Shafiq was with him on 50 reaching the milestone of 1,000 Test runs in the process.
The duo batted with great application and with a little bit of luck survived the post-lunch session adding 73 runs in 30 overs to frustrate South Africa.
Both completed their half centuries with Younis Khan reaching it style by pulling Peterson for a six over mid wicket.
The Pakistan pair grew in confidence as the day progressed taking the attack to the South African bowlers especially left arm spinner Peterson who went for 37 in his 10 overs.
Asad Shafiq completed his eighth Test half century by turning around for a couple following an overthrow.
Pakistan are 133-4 after 57 overs having been put into bat by South Africa in the second Test at Newlands on Thursday.
Shafiq's half century which came off 115 balls contained six boundaries.
Younis Khan hoists Robin Peterson for the first six of the match over midwicket to bring up his 27th Test half century in style after having got a streaky boundary edging one from Morkel through the slip cordon in the previous over.
Younis' half century which came off 133 balls contained four boundaries and a six.
Younis Khan and Asad Shafiq have added 50 runs in 22 overs after lunch without being separated as they gradually get on top of the South African bowling.
Asad Shafiq attacks Jacques Kallis standing on his toes and virtually hitting an uppercut over point for his sixth boundary to move into the 40s.
Asad Shafiq brings up the 100 of the Pakistan innings in the 47th over by cutting Peterson to the third man boundary.
Pakistan are showing more positive intent with Younis Khan hooking Steyn while Asad Shafiq pulls left arm spinner Peterson for another boundary.
Asad Shafiq shrugs off being let off by Dean Elgar who fails to latch onto a sharp chance by pulling Robin Peterson through midwicket for his third boundary.
Younis Khan brings up the 50 partnership off 152 balls for the fifth wicket with Asad Shafiq with a delightful cover drive to the fence off Steyn.
Asad Shafiq punches Robin Peterson for only his second boundary just before the drinks interval in the afternoon session adding 21 runs in 14 overs after lunch with Younis Khan bringing a lull in the proceedings.
Steyn sends down a second consecutive maiden while spin is introduced for the first time with Robin Peterson coming into the attack with Pakistan on 73-4 after 38 overs.
Steyn and Morkel have sent down consecutive maiden overs choking Pakistan's fifth wicket pair of Younis Khan and Asad Shafiq whose name of the game is occupation in the middle.
Vernon Philander and Morne Morkel have given away just 11 runs in eight overs after lunch as Younis Khan and Asad Shafiq failed to break the stranglehold of the South African attack as Dale Steyn returns.
Asad Shafiq gets his first boundary when he cracks Philander over extra cover in the second over after lunch after Morkel bowls a maiden as Pakistan resumed on 60-4.
Pakistan reached 60 for the loss of four wickets in 27 overs at lunch on the first day of the second Test against South Africa at Newlands on Thursday.
Younis Khan was unbeaten on 24 off 59 balls having added 27 runs so far for the fifth wicket with Asad Shafiq who was on 11.
Having been put into bat after Graeme Smith won the toss, Pakistan were throttled by the pace trio of Dale Steyn, Vernon Philander and Morne Morkel.
Openers Nasir Jamshed and Mohammad Hafeez (17) departed in quick succession with Philander and Steyn picking up a wicket each.
It was Morkel who caused the most damage striking twice within the space of five deliveries to reduce Pakistan to 33 for four.
Morkel finished with two for 22 from his seven overs claiming the wickets of Azhar Ali and Misbah ul Haq for a fourth-ball duck.
Younis Khan was in good nick having batted nearly an hour and stroked two boundaries.
Younis Khan brings up the 50 of the Pakistan innings with a sweetly timed straight drive to the fence off Philander in the 22nd over.
Pakistan are 57-4 after 25 overs after being put into bat by South Africa in the second Test at Newlands on Thursday.
Younus Khan gets his first boundary with a lovely cover drive off Morne Morkel who goes for 10 in his seventh over.
Misbah ul Haq is out for a duck caught at short leg by Dean Elgar off Morne Morkel who strikes for the second time in five deliveries in his fifth over.
The Pakistan captain failed to keep down a rising delivery from Morkel which he fended to Elgar.
Morne Morkel strikes removing Azhar Ali caught behind by AB de Villiers off a thick outside edge after battling 44 minutes to score four off 21 balls.
South Africa are off to a terrific start in a story somehwat similar to the first Test removing both Pakistan openers Mohammad Hafeez and Nasir Jamshed but Younus Khan has got into his stride stroking the ball confidently.
Mohammad Hafeez's patient vigil is ended by Dale Steyn who strikes with the first ball of a new spell.
Graeme Smith at first slip takes a low catch as Hafeez gets a thick edge off a snorter from Steyn after making 17 off 35 balls with one boundary.
Hafeez hits the first boundary of the Pakistan innings edging Philander through the slip cordon to third man in the 10th over.
Nasir Jamshed is gone for three caught behind by AB de Villiers off Vernon Philander after having been dropped by Faf du Plessis in the previous delivery.
Attempting to drive Philander, Jamshed only succeeds in getting a thick outside edge after surviving 31 minutes and facing 23 balls.
Hafeez opens his account by driving Philander for three runs in the sixth over of the innings after facing 16 balls.
Mohammad Hafeez and Nasir Jamshed are content to dig deep against the swing and movement generated by Dale Steyn and Vernon Philander in the opening overs.
Nasir Jamshed opens the Pakistan account with a single off Vernon Philander after being put into bat by South Africa in the second Test at Newlands on Thursday.
Pakistan's destroyer in the first Test South Africa's Dale Steyn bowls a maiden to Mohammad Hafeez to open proceedings in the 50th Test match at Newlands.
South Africa have put Pakistan into bat after Graeme Smith won the toss in the second Test at Newlands in Cape Town.
The hosts lead the series 1-0 after winning the first Test by 211 runs inside four days after Pakistan were shot out for their lowest Test score of 49 in the first innings and Steyn bagged 11 for 60.
South Africa field an unchanged team while Pakistan have been forced to make two changes because of injury to Junaid Khan and Rahat Ali.
Mohammad Irfan has been handed a Test debut while Tanvir Ahmed is the other replacement.
Pakistan will be up against Dale Steyn, Vernon Philander and Morne Morkel on the ground where Australia were bowled out for 47 last season and New Zealand for 45 last month.
South Africa have won 20 of 25 Tests since returning to international cricket in 1991 at this venue.
This match will be Smith's 100th as captain of South Africa which he has led to eight wins, four draws and one defeat in 13 captaincies at Newlands.
South Africa: Graeme Smith (captain), 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 (captain), Asad Shafiq, Sarfraz Ahmed, Umar Gul, Saeed Ajmal, Tanvir Ahmed, Mohammad Irfan