Pakistan's most accomplished batsman Younus Khan completed an unbeaten double century on Friday to turn the course of the first test against Zimbabwe at the Harare Sports Club.
At the close Zimbabwe, set 342 for victory when Pakistan declared their second innings closed at 419 for nine, were 13 for one after Tino Mawoyo was dismissed lbw for two by off-spinner Saeed Ajmal.
Younus brought up his 200 with a six during an unbeaten 88-run partnership for the final wicket with Rahat Ali, who struck a swashbuckling 35 from 40 deliveries.
He spent just over 10 hours at the crease, swinging the balance of the test and effectively ending any hopes that Zimbambwe would chase an attainable target on the final day.
Instead, the home side face a battle for survival on a deteriorating pitch.
Pakistan, who resumed on 168 for four, lost the wicket of Asad Shafiq (15) in the first over.
However, Younus and Adnan Akmal saw off some lively bowling to add 118 runs for the sixth wicket which ended with a farcical runout when Adnan had reached 64.
Three wickets to off-spinner Propser Utseya reduced Pakistan to 331 for nine, raising the prospect of an exciting run chase for Zimbabwe, before Younus and Rahat Ali put the test effectively beyond the home team's reach.