Resuming the day on 128 without loss, Pakistan, thanks to fine knocks from Salman Butt (66), Imran Farhat (61), Faisal Iqbal (67) and Mohammad Yousuf (89) erased the overall deficit of 120 runs then built a lead of 99 with six wickets in hand.
Daniel Vettori made a surprise change early in the morning by tossing the ball to Martin Guptill. Guptill immediately made an impact, having Butt caught and bowled for 66.
Imran Farhat followed soon, dismissed for a well-made 61.
Pakistan skipper Mohammad Yousuf and Faisal Iqbal then steadied the innings and together added 128 for the third wicket in 52.4 overs.
Iqbal was eventually dismissed for 67, caught by Ross Taylor off the bowling of Chris Martin.
With the Test series tied 1-1, the final day will see New Zealand bowlers attempt to dismiss Pakistan as cheaply as possible before allowing their batsmen chase down a hopefully-small final innings total.
Scorecard
Pakistan (1st innings): 223
New Zealand (1st innings): 471
Pakistan (2nd innings): (overnight 128-0)
I Farhat c & b Guptill 61
S Butt c & b Guptill 66
F Iqbal c Taylor b Martin 67
M Yousuf c McCullum b O''Brien 89
U Akmal not out 48
Misbah-ul-Haq not out 4
Extras (b-3, lb-2, nb-2, pen-5) 12
Total (for 4 wkts, 141 overs) 347
Fall of wickets: 1-128, 2-146, 3-274, 4-333.
Bowling: C Martin 24-5-55-1, T Southee 23-5-54-0, I O'Brien 28-4-85-1, D Tuffey 16-0-55-0, D Vettori 39-16-60-0, M Guptill 11-2-28-2.
Yousuf to lead Pakistan against New Zealand
Pakistan denies visas to Indian wrestlers
Kiwis retain squad for second Test
Pakistan is close to my heart, says Hillary
McCullum ton powers New Zealand past Pakistan