Bulawayo: Tatenda Taibu hit an undefeated 58 on Sunday to avoid early defeat for Zimbabwe against Pakistan after the hosts had collapsed to 69-8 in the one-off Test.
Zimbabwe finished the fourth day on 135-8 in their second innings, with a lead of 81 runs. Mohammad Hafeez was the pick of the Pakistan bowlers with 4-31 at the Queens Sports Club. Seamer Aizaz Cheema and spinner Saeed Ajmal took two wickets each.
Pakistan looked set for an easy victory after Zimbabwe were reduced to 55-5 at tea - just one run ahead - and then lost three wickets soon after.
Zimbabwe finished the fourth day on 135-8 in their second innings of the one-off Test.
Taibu ensured a final day's play by sharing an unbroken ninth-wicket stand of 66 with Kyle Jarvis (20 not out).
"We could have been in a better situation but all credit should go to Taibu and Jarvis," Pakistan coach Waqar Younis said. "We have to come back tomorrow and make sure that they don't get too much and try and get those runs as soon as possible."
Zimbabwe's bowlers did well earlier to bowl out Pakistan for 466 to limit the visitors' first-innings lead to 54 runs, after Zimbabwe scored 412.
But Zimbabwe's top-order was undone in the second innings by a combination of Cheema's pace variation and Ajmal's turn.
"We were pretty happy that we got them out but unfortunately all the hard work was undone by the top order," Zimbabwe captain Brendan Taylor said. "It was a combination of good bowling, alongside poor batting, poor shot selection and poor mindset ... It was always going to be tough facing Ajmal and Hafeez on that wicket."
Cheema removed Zimbabwe opener Vusi Sibanda (5) and Hamilton Masakadza (8), while Ajmal accounted for Tino Mawoyo (12) and Taylor (5).
Hafeez took his first wicket by trapping Craig Ervine leg-before-wicket for 6. Hafeez, who scored 119 in Pakistan's first innings, went on to remove Greg Lamb (7), Ray Price for a duck and Brian Vitori (7) with accurate offspin bowling.
With victory looking certain for Pakistan, Taibu and Jarvis batted together for 27 overs to ensure a final day's play.
"It was a good thing for Taibu to take the majority of the strike," Taylor said. "We know that Pakistan is a side that can capitulate but we are still a long way off. We still have to bat two more hours and hopefully we will put 140-150 on the board to give our bowlers something to bowl at."
Despite the collapse, Taylor expressed satisfaction with his team's performance in the Test, which is only Zimbabwe's second in six years.
"Coming into this game no one gave us a chance to even get to the third day but now we have gone into the fifth day. So win, lose or draw, we are satisfied by how things have gone," Taylor said.
Earlier, Pakistan resumed overnight on 357-5 and Zimbabwe were again let down by their poor fielding.
Younis Khan led Pakistan's charge, scoring 88 runs with five boundaries and a six, before he was caught by Taylor at slip off Price as the visitors were eventually bowled out for 466.