Pakistan's attempt to wrap up their one-off test with Zimbabwe a day early was thwarted by a resolute innings from Tatenda Taibu at Queens Sports club in Bulawayo on Sunday.
An astonishing collapse by the hosts in their second innings saw them go to tea on the fourth day on 56-5, just two runs ahead of Pakistan who had been dismissed for 466 just after lunch.
But Zimbabwe lived to fight until the final day thanks to a gutsy ninth-wicket stand worth 66 between Taibu (58) and Kyle Jarvis.
The hosts will resume their second innings on 135, a lead of 81.
Zimbabwe will have been relieved to pass their lowest test total, 54 against South Africa in Cape Town in 2005.
The Zimbabweans had more than held their own over the first three days but that effort seemed to have taken its toll as their top order batsmen surrendered their wickets all too easily with captain Brendan Taylor out for five for his sixth successive failure.
Tinotenda Mawoyo barely made it to double figues as he went for 12.
The match looked on a plate for Pakistan, especially when the score for Zimbabwe stood at 69 for eight, providing a trifling lead of 15 with two wickets left.
But the irrepressible Taibu was having none of it, especially when Jarvis dug in as well.
The recovery game is one that Taibu often plays well.
He is small but stubborn and skilful in desperate situations, as he has shown before.
His present effort is a hopeless cause, most likely, but one worth taking up for the sake of the record books.
The story of the day began in late afternoon when Zimbabwe set out to wipe off their 54-run deficit.
But they fell into a heap of broken wickets. Vusi Sibanda was caught trying to hook, then came Mawoyo's exit on 12, 151 runs short of his first innings effort.
The next seven batsmen all failed to reach double figures until Taibu and Jarvis put on the brakes.
Taibu's 58 was his 11th Test half century.
Despite causing so much mayhem early on, Pakistan bowlers Saeed Ajmal, Aizaz Cheema and Mohammad Hafeez, from whom so much was expected, could make no further progress.
Hafeez could however record on Monday what is known as a "viper" - a century and five wickets.
He would be the 20th player in Test history to have this on his c.v.. But first Taibu and Jarvis must be broken.
Earlier the Pakistani batsmen had thrown caution to the wind as they upped the scoring rate to go into lunch on 460-8.
Beginning the session on 357-5 and looking for a big lead to put Zimbabwe under pressure, Pakistan lost three wickets, including the pivotal wicket of Younis Khan, who only added 27 to his overnight score of 61.
He was caught somewhat fortuitously at first slip by Taylor off veteran spinner Raymond Price, the ball first bouncing off wicketkeeper Taibu's pad.
Umar Akmal survived a TV review of a run-out appeal but he failed to capitalise on that reprieve as he was caught soon afterwards by Taylor off Gregory Lamb for 15.
Sohail Khan was then caught by Lamb on the mid-wicket boundary off Christopher Mpofu for 11.
Khan had been dropped at gully by Hamilton Masakadza just beforehand - the sixth spilling of the innings - and he punished Masakadza by hitting the next ball for a six.
Saeed Ajmal spent the last three overs of the morning scoring quick runs but was eventually out for 28 after lunch, bowled by the dependable Price.