Afghanistan 157 and 291 for 7 (Rahmat 139, Ismat 64*, Muzarabani 4-71) lead Zimbabwe 243 by 205 runs
Afghanistan dragged themselves to a position of advantage on an attritional third day, with Rahmat Shah's gritty century, his third in Test cricket, headlining their much improved batting display from their first innings.
On the second day where 13 wickets fell, Afghanistan conceded an 86-run first-innings lead to Zimbabwe and lost three wickets before wiping out even half the deficit.
But on Saturday, Rahmat, with help from Shahidullah and debutant Ismat Aslam, stretched Afghanistan's lead beyond 200 with three wickets still remaining, before rain forced early stumps.
For Zimbabwe, Blessing Muzarabani added two wickets to his overnight tally of two, while Richard Ngarava struck twice, including the prized scalp of Rahmat, but they know with Ismat still at the crease along with Rashid Khan, who is capable of scoring some quick runs, they are going to be staring at a steep chase on a pitch where batting fourth is a daunting proposition.
Afghanistan's innings revolved around two partnerships. The first was a 67-run stand between Rahmat and Shahidullah that saw the visitors take a 50-run lead by the time it was broken.
The pair got together after Afghanistan lost two wickets in the first hour of play while still 17 runs behind.
From the way Rahmat started the day, it was evident he wanted to bat long for Afghanistan to get into a winning position. He played out 19 balls before scoring the first run off his bat on the day.
Ngarava removed the nightwatcher Zia-ur-Rehman the very next ball, and dismissed Afsar Zazai soon after.
This prompted Rahmat to take the initiative as he punished two consecutive bad balls from Muzarabani - a full toss and a half-volley - with drives down the ground for boundaries.
There was a short rain delay that followed, after which the two dealt in singles till Afghanistan were in the lead in the 30th over.
Rahmat and Shahidullah took on Sikandar Raza and Newman Nyamhuri for two boundaries off the next two overs before Rahmat brought up a half-century off 99 balls. The boundaries kept coming as the two trudged along to lunch with a 39-run lead.
In the fourth over after tea, a smart piece of captaincy brought about Shahidullah's downfall.
With Muzarabani testing him outside off from around the wicket, Craig Ervine brought on a silly point fielder and the next delivery, Shahidullah fended at a length ball in the corridor to offer the simplest of chances to Takudzwanashe Kaitano at silly point.
Zimbabwe knew they had to capitalise on the opportunity, and put the screws on Afghanistan.
Ismat, who was out without scoring in the first innings, copped a blow on the helmet trying to duck under a Muzarabani bouncer that stayed low and needed multiple check-ups from the physio over the next few overs.
Rahmat survived an lbw chance when Raza, who toiled away for 23 wicketless overs in the day, got one to spin in sharply to strike his pad only for the umpire to turn it down. Rahmat responded by dancing down the track and lofting him down the ground for a boundary before he took a hit on the shoulder from an Ngarava short ball.
But the two were unfazed and went about steadily increasing Afghanistan's lead. Rahmat brought up his century with a single of Nyamhuri off 209 balls, following up on his double in the first Test.
Ismat, who was on 16 off 46 at the point, then started to shift gears with two boundaries off Nyamhuri before tea.
After tea, there were 11 consecutive overs of spin, but Raza and Bennett couldn't break through or keep the scoring rate down to apply pressure.
As soon as the new ball became available, Zimbabwe found some immediate chances. Ngarava drew the edge from Ismat but he was dropped by Ervine at first slip, when he was three runs short of his fifty. One over later, Ismat brought up a half-century.
The set batters used the extra pace of the new ball to cash in on a few more boundaries before Muzarabani finally broke the stand on 132 - the highest for the seventh wicket for Afghanistan.
Muzarabani got a length ball to seam in past Rahmat's inside edge and hit his back pad. Rahmat wasn't best pleased when the umpire ruled him out leg before, but with no DRS available in this series, he had to walk back after a marathon innings.
Rashid then quickly moved to 12 off as many deliveries, hitting Nyamhuri through midwicket for a boundary off what proved to be the last ball of the day before the players were called off for rain.