Zimbabwe built a 185-run lead by stumps on day three of the second Test having capitalised on a first-innings collapse by Pakistan, who were bowled out for 230 in nine frantic overs on Thursday and lost their last five wickets for 19.
Pakistan made a late fightback in the final session, though, dismissing three Zimbabwe batsmen in the last three overs as the hosts were 121-4 at the close of a significant day in the destiny of the two-Test series.
Spinner Abdur Rehman was key to Pakistan's attempt to drag themselves back into the final match, taking two late wickets, including opener Tino Mawoyo for 58 after he guided the early part of Zimbabwe's second innings.
Zimbabwe 1st Innings: 294
Pakistan 1st Innings
K Manzoor run out (Chigumbura) 51
M Hafeez c Masakadza b Vitori 22
AAli lbw b Panyangara 7
Y Khan c Mawoyo b Panyangara 77
M-ul-Haq c Masakadza b Vitori 33
A Shafiq b Chatara 10
A Akmal c Taylor b Vitori 6
A Rehman lbw b Panyangara 0
S Ajmal c Mutumbami b Vitori 7
J Khan b Vitori 3
R Ali not out 1
TOTAL: (all out) 230
Fall of wickets: 1-29, 2-62, 3-96, 4-182, 5-211, 6-212, 7-212, 8-224, 9-229.
Zimbabwe 2nd Innings
T Mawoyo lbw b Rehman 58
P Utseya c Shafiq b RAli 5
HMasakadza lbw b RAli 44
T Panyangara c AAli b Rehman 0
B Taylor not out 0
Extras: (3b, 6lb, 5w) 14
TOTAL: (for 4 wickets) 121
Fall of wickets: 1-13, 2-117, 3-121, 4-121.
Hamilton Masakadza (44) and nightwatchman Tinashe Panyangara also went in the nine-ball spell right at the end of the day, which gave the tourists renewed confidence of finding their way back into the match.
Pakistan won the first of the two Tests at Harare Sports Club by 221 runs after also surrendering a first-innings lead.
Still, Zimbabwe were undoubtedly in the driving seat in this game with their lead approaching 200 and in their best position in years to win a Test against a team other than Bangladesh.
The last time the Test cricket strugglers achieved that feat was in 2001 against India. Zimbabwe haven’t beaten Pakistan in a Test in nearly 15 years, and have lost five out of seven series since returning to Test cricket in 2011.
Zimbabwe also may be aided and Pakistan hampered by what's expected to be a tough pitch to bat on last, with Harare's well-worn surface hosting successive Tests with just two days' break.
Younis Khan top-scored with 77 in the first innings, and was seemingly guiding Pakistan smoothly to within reach of Zimbabwe's first-innings total of 294.
But Younis fell straight after lunch to a miscued shot to midwicket and began the slide as Pakistan went skidding to a 64-run deficit, with left-arm seamer Brian Vitori taking 5-61.
The last five Pakistan batsmen made only 17 runs between them under Vitori's career-best bowling and Panyangara's 3-43, which suddenly put Zimbabwe in control.
Without ill opener Vusi Sibanda, Zimbabwe lost stand-in Prosper Utseya early in their second innings, only for Mawoyo and Masakadza to construct a 104-run partnership to take the home team forging ahead.
Mawoyo hit seven fours and Masakadza six fours until spinner Rehman (2-20) and seamer Rahat Ali (2-37) revived Pakistan just before the close with three quick strikes.