New Zealand then lost both openers with only eight runs on the board.
Bangladesh enjoyed a decent start as the second Test against New Zealand finally got underway on Sunday, before rain cut short day three.
New Zealand, who took the field without injured skipper Kane Williamson, suffered a further injury blow on the final morning when wicketkeeper BJ Watling strained a hamstring during his warm-up and was replaced by the uncapped substitute Peter Bocock.
But after the Black Caps tore through Bangladesh's batting order on the third day, veteran batsman Ross Taylor backed them up with an impressive double-century yesterday to set up today's thrilling conclusion.
Williamson was on 10 not out, while Taylor was unbeaten on 19 after first Test centurions Tom Latham and Jeet Raval had been dismissed cheaply in bowler-friendly conditions at the Basin Reserve.
"I thought they bowled really well those first six or seven overs and Kane and I were jumping around a bit".
It worked. Bangladesh was 119-1 approaching lunch but Wagner took two wickets immediately before the break and two more soon afterwards, capturing the key wicket of Tamim Iqbal for 74, as Bangladesh slumped to 168-6.
"We didn't play the first two days".
The win gives New Zealand an unassailable 2-0 lead in the three-match series, having also won the first Test by an innings.
Mithun had resumed on 25 with Soumya Sarkar on 12.
"It was sad that we dropped catches of someone, twice in the same over, who went to hit a double-hundred", he said.
Of the 20 Bangladesh wickets to fall, Wagner took nine, including five for 45 in the second innings.
Captain Mahmudullah provided the only real resistance for the visitors with a counter-attacking 67, while Mohammad Mithun scored a patient 47 and had held off New Zealand's bowlers late on the fourth day. They then received a lesson in seam bowling technique for Bangladesh's Abu Jayed who hit a ideal length, made the ball duck about and dismissed New Zealand openers Tom Latham for 4 and Jeet Raval for 3.
India vs Australia 5th ODI
In the fourth ODI match against Australia in Mohali, team India missed many opportunities that led to their humiliating loss. Opting to bat, Australia got off to another good start as Khawaja and Aaron Finch (27) put on 76 runs for the opening stand.