The visitors looked to be heading for a heavy defeat when they slumped to 82-4 before tea chasing down 480, but the pair batted through the final session to give Pakistan hope.
They still need 297 runs to win but with the rain predicted on the final two days all results remain possible.
Misbah (44 not out) and Shafiq (53 not out) batted patiently, seeing out 45 overs in their partnership as South Africa struggled to find a breakthrough.
In part the home side have only themselves to blame. Vernon Philander thought he had Shafiq caught at slip by Graeme Smith when the batsman was on 40, but the Pakistan right-hander was recalled after a check with the third umpire showed it was a no-ball.
In the next over Robin Peterson dropped a simple chance offered by Misbah at point off the bowling of Kallis.
With the new ball due in just five overs on Monday morning, South Africa will still be confident of forcing a result if the weather holds.
Things did not start as well for Pakistan in their second innings though. Mohammed Hafeez made just two as he glanced a leg-side ball from Philander, but succeeded only in providing wicketkeeper AB de Villiers with a catch behind the stumps.
Debutant Nasir Jamshed's stoic resistance came to an end when he attempted a pull off Dale Steyn, but got his timing all wrong and picked out Robin Peterson at mid-on four runs short of a maiden test half-century.
Azhar Ali (18) was trapped in front by Kallis and although he chose to review the decision, the TV umpire upheld his dismissal.
Younus Khan (15) was not sure whether to play or leave a Morne Morkel delivery and in the end did neither, a faint edge being snapped up by De Villiers to leave his side four down.
Earlier in the day, South Africa made a fast start when they resumed their second innings, scoring 68 runs in just nine overs before declaring on 275 for the loss of three wickets.
Resuming on his overnight 63, de Villiers led the charge with a sparkling unbeaten century off 117 balls.
He was ably supported by Hashim Amla, who moved from his overnight 50 to 74 not out by the time Smith called the players in with 50 minutes of the morning session gone.
By that time the pair had put on a Wanderers record fourth wicket test partnership of 176, beating the previous mark of 147 they had set against Australia in the 2011/12 season.
COMMENTS (24)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ
stop critising misbah if he got out you will not be able to reach 100 i bet
A pair of Pakistani batsmen survivng 42 overs. really wanna know, whos' conspiracy is this.one??
seeing Pakistan all out for 49 is a lot less painful then Misbah doing tuk-tuk in the second innings. People don't want Misbah anymore. Please bring Adridi back..
Less than 50 is just 'panic'. However, let's not forget that Pakistan and India have mostly struggled on pitches in Australia, South Africa and England; same as the spinning tracks become horror in the sub continent for them (last England victory and some others are not the norm). So why just blame Pakistan and India that they don't play well on these bouncy pitches. They play better in their own conditions and we do well in our own environment. In cricket "playing field" is never "even" .... and that is the KEY difference!
@ WHAT and John the Baptist so what if we are not good in INGLISH, it is just another language just like urdu, hindi, punjabi, etc etc, it works, as long as you get the point :P ... jeez, how long will it take us to overcome this huge inferiority complex that everything white/englsh is better ...perhaps we can blame the british ;)
@voice of sindh: You have no idea what you are talking about . Do an iota of research before you start commenting.
Pakistan has won innumerable series outside Pakistan.
If one looks at the results of matches against England in England we could see our batting failure. Our record has been horrible in Australia as well when the ball is moving and the conditions are helpful for the bowlers and wickets are fast. In fact after the horrible tour of England in 1962 when Pakistan got full five test matches the result was 0-4. One test was mostly washed out to keep it from 0-5. That team had Hanif, Imtiaz, Fazal, Mushtaq, Saeed and other big names compared to the current team. After that 5 test series Pakistan did not get another 5 test series and was relegated to three. Like Afridi, Hafeez may be a great all-rounder against the top oppositions on a fast wicket they look mediocre. There was only great batsman M. Yousuf but he was prematurely forced out. Once Misbah leaves the sanity would be gone and the team would further slide downhill. Younus is a shadow of himself and the only hope is Asad Sahfiq who is batting in the mold of young MY. The failure of batting is not shocking but the way much touted bowlers failed does not bode well for the future. As high school kids when somebody would brag about a new start batsman we used to say "send him on a tour of UK or Australia and we would know how good he is?"
@Singh:
@Ali Khan: “No problem boys you are aloud lose frome every on but ENDIA” Please take some English Class or learn how to use ABC But it is good effort to comment in English. It should be as follow: No problem boys, you are allowed to loose from everyone but India.
Another great example of an oven calling the kettle black--in this context, the proper word should be "lose" not "loose" which is the state of your character
we should encourage misbah and asad's effort , we all know that we cannot win but still hope for best which probably will be a draw ... stop critcising Misbah he is a very talented , cool , calm captain who never takes stress and guides the team well through pressure situations and always play's his natural game. we should pray and hope for best .
match will finish on 4rth day
Stop being silly guys and enjoy good cricket.
Hosts are always favorites in any test series so it won't be a surprise result.
Pakistans problem has been one horror session where they loose it completely. it's good to see Pak showing some resistance, Misbah and Shafiq must survive new ball tomorrow morning or it could be done in an hour.
300 runs in 2nd inn from Team Pak will be half a victory for me.
I've always admired Misbah for his leadership skills and ability to play the game with a cool headed approach. After all it's not easy to handle the kind of Khaleefas we have in our team. Today, he did exactly what was required - didn't throw away his wicket and guided Asad Shafiq in a sensible manner. Victory is still a very long way to go, but I won't mind even if we lose cos these two players have put a price on their wickets.
Shame on Shoaib Akhtar and Noman Niaz who are still criticizing our captain!
Alive?? are you kidding?? just save us from a humiliating defeat
@voice of sindh: Away series from Pakistan, and Pakistan loses? Are you kidding me? Which series took place in Pakistan in last four years?
ET wake up from deep slumber, "SA dismisses Pakistan's top four". What is this nonsense, the main line of this story is still same even after half day. Come on at least acknowledge the efforts of Misbah-ul-Haq and Asad Shafiq
The strong batting line up of India and strong bowling attack of Pakistan got badly exposed in England and SA respectively which is indeed tragic for both countries.
What a record breaking ist inning performance by Pak team. The same way the present government is performing the record breaking performane in corruption so far.
@ What First improve your own English. You wrote (You people really have 'go' to school).
@Ali Khan: "No problem boys you are aloud lose frome every on but ENDIA" Please take some English Class or learn how to use ABC But it is good effort to comment in English.
It should be as follow: No problem boys, you are allowed to loose from everyone but India.
Now we have become the habitual of seeing these things. away series from pakistan, result is almost certain. opponent has defeated Pakistan. history tells us pakistan has never won a single series as away from country. always lost from Australia, south Africa, newzealand, england. they perform well in sub continent, but as ball gets little be bounce, our batsman willing to have edges and bowlers have nothing to do but running and get punished by aaaaaaaaaaaaamla.
but don't lose the hope. still two matches are in the beg. Pakistan can come back well.
The match getting very interesting;It is the test of Asad's youth and Misbah's Preserverance.
@Ali Khan: What is that ??? aloud lose - frome - ENDIA ???? Man, you people really have go to school, seriously.
No problem boys you are aloud lose frome every on but ENDIA