Bangladesh looked to be closing in on a shock victory over world Test champions New Zealand after Ebadot Hossain's three-wicket burst in the final session of the fourth day reduced the hosts to 147-5 in the opening match in Mount Maunganui on Tuesday.
After four of Bangladesh's top six batsmen struck fifties to earn them a first-innings lead of 130, Ebadot (4-39) wrecked New Zealand's top order to put the tourists on the brink of a major upset despite their poor catching on the penultimate day.
Ross Taylor, playing his last test series, was batting on 37 with all-rounder Rachin Ravindra on six at the other end, with New Zealand 17 runs ahead with five wickets remaining.
"We are in a good position but we are not overexcited," Bangladesh wicketkeeper Liton Das told reporters.
"We still have to take five wickets conceding as few runs as possible because batting won't be easy tomorrow because of the variable bounce."
New Zealand batting coach Luke Ronchi said Taylor and Ravindra could not afford to be negative on the final day.
"Ross and Rachin will have to start the innings off again and play nice and straight," he said.
"Tomorrow we've got to play a positive style of cricket, making sure we are scoring a few runs, not just trying to bat the day out."
Earlier, Bangladesh resumed on 401-6 and the lower order batted 20-odd overs before being all out for 458 in the first match of the two-test series.
Number eight batsman Mehidy Hasan made 47 while Trent Boult (4-85) and Neil Wagner (3-101) claimed the bulk of the wickets for the hosts.
Bangladesh returned to claim two wickets in the second session to put New Zealand under pressure.
Leading the side in the absence of the injured Kane Williamson, Tom Latham dragged a delivery from Taskin Ahmed onto his stumps to depart for 14.
Ebadot removed Devon Conway for 13 and it could have been a full-blown crisis for New Zealand had Liton not spilled Will Young, then on 31, after off-spinner Mehidy had produced an edge.
Mehidy suffered more heartbreak when he induced a slog-sweep from Taylor but Shadman Islam floored the catch at square leg.
New Zealand had just erased the deficit when Ebadot dismissed Young (69) and Henry Nicholls for a duck in the same over.
Tom Blundell also went for a duck in Ebadot's next over as Bangladesh put themselves in the box seat.
Catch Sehwag, Yuvraj, Harbhajan in action soon!
Australia recall Khawaja for fourth Ashes Test
Ex-skipper Hussain on how England can bounce back
Stokes says he has 'no ambition' to be England captain
Ashwin reveals 'landmark moment' of his career