Spinner Ray Price dismissed ShahriarNafees just before the close to give Zimbabwe the edge after day two of its comeback Test against Bangladesh on Friday.
Nafees was out for 50 and Bangladesh was 107-3 at stumps, 263 runs behind Zimbabwe's first innings total of 370.
Mohammad Ashraful was 34 not out and Mahmudullah 4 not out when the players went off in fading light at Harare Sports Club.
Earlier, Hamilton Masakadza hit his first Test century in 10 years before a sudden collapse — when the host was set for an imposing first innings total in its first Test in six years — brought Bangladesh back into the one-off match.
"Slightly disappointed to be in the position we were in and not press home the advantage," Zimbabwe captain Brendan Taylor said. "But we have put that behind us and I'm glad that the afternoon session belonged to us."
Masakadza combined for a 142-run partnership with new skipper Taylor (71), but his dismissal for 104 began a slump as Zimbabwe lost eight wickets for 66 runs to go from 304-2 to 370 all out.
Bangladesh captain Shakib Al Hasan and RubelHossain took three wickets each to turn things around after a lackluster bowling effort on day one.
"We had a good meeting yesterday and we discussed about bowling as straight as possible and not giving away easy runs," Shakib said. "It will be good tomorrow for someone to score a hundred and put a lot of runs on the board."
Debutant fast bowler Brian Vitori then took two quick wickets at the start of Bangladesh's reply to revive the Zimbabweans.
Nafees and Mohammad Ashraful replied with a 66-run stand but Nafees was dismissed less than five overs before the end, putting Zimbabwe just ahead in a close battle between Test cricket's lowest-ranked countries.
Nafees had stroked nine fours in his fifth Test half-century, then attempted a sweep to off-spinner Price and the ball bounced off the back of his bat and rolled gently onto the stumps.
Earlier, the Zimbabweans had looked set to move into a dominant position when Masakadza and Taylor took the overnight score of 264-2 past 300.
Masakadza hit eight fours and a six on the way to his second-ever Test hundred and first since his debut as a 17-year-old at the same ground a decade ago.
When the right-hander, now 27, clipped a shot to the legside to move to 100 he set a new mark for the longest time for a player between his first and second Test centuries.
"It was a long time coming, it was a great feeling. I was trying to stop people to continue talking about the debut one," Masakadza said.
But he fell trying a flashing drive off Robiul Islam (2-106), who also dismissed Taylor, and Zimbabwe lost four wickets before lunch and four more in quick succession in the afternoon session to post a far lower score than expected.
Left-arm spinner Shakib led with 3-62 and seamer RubelHossain took 3-84 for Bangladesh.
TatendaTaibu — who made stinging criticism of Zimbabwe's cricket board in the run-up to the Test — resisted with 23 from 44, but when he was out to Shakib, Zimbabwe fell away.
Vitori — one of four Zimbabwean debutants in the Test — had ImrulKayes out for 4 in the fifth over and TamimIqbal was on 15 when he was also caught in the slips to leave Bangladesh 36-2.
Nafees came to the rescue with his battling innings and reached 50 off 117 balls. His unfortunate dismissal late in the day sparked rowdy celebrations from the Zimbabwean fielders.