Captain Kane Williamson scored his 15th century as New Zealand staged a remarkable fightback to win the first Test against Bangladesh by seven wickets in the final session in Wellington on Monday.
Williamson and Ross Taylor, determined not to run out of time, batted at more than 6.0 an over in their 163-run third wicket partnership with New Zealand chasing down a 217-run target.
The New Zealand skipper finished unbeaten on 104 with Taylor out for 60 and Henry Nicholls not out four.
Bangladesh were in command for nearly four days, until their second innings lasted less than 58 overs to end at 160-9 and captain Mushfiqur Rahim in hospital after being felled by a Tim Southee bouncer.
It was a disappointing sequel to their imposing first innings of 595-8 declared, presenting them with the unwanted record of the highest ever score in the first innings to lose a Test.
The previous mark was set more than 120 years ago, when Australia scored 586 against England at the Sydney cricket ground in 1894.
New Zealand made a shaky start to their run chase with first innings centurion Tom Latham out for 16 and fellow opener Jeet Raval for 13, both removed by off-spinner Mehedi Hasan in the space of eight balls.
But Williamson and Taylor were unruffled on a warm Wellington afternoon that was a far cry from the blustery first day when Bangladesh batted positively on a green wicket.
Williamson brought up his century — levelling the scores with a sweep off Mehedi to the boundary — before ending the game with a single off the next ball.
Bangladesh resumed the final day at 66-3 and were in early trouble when Shakib Al Hasan, whose 217 in the first innings is a record high score for a Bangladesh batsman, lasted only five balls before going for a duck.
Mominul Haque, who has two centuries to his name in five previous innings against New Zealand, was removed this time for 23.
At 96-5, Sabbir Rahman and Mushfiqur added 18 runs in 16 overs in the face of a torrid attack from the New Zealand pace trio of Southee, Trent Boult and Neil Wagner.
Mushfiqur, who had been unable to field for Bangladesh during New Zealand's first innings 539, was forced to duck repeatedly under a barrage of bouncers until a ball hit the back of his helmet.
He lay prone on the wicket, attended by medical staff from both teams until an ambulance drove on to the field and took him to hospital. He was later given the all-clear.
Opener Imrul Kayes, who was stretchered off and taken to hospital late on the fourth day with a hip injury, hobbled to the crease at the fall of the seventh wicket.
Unable to run, he relied on boundaries to be 36 not out when the innings ended.
Boult finished with three for 53 while Wagner and spinner Mitchell Santner took two wickets each.
The second Test starts in Christchurch on Friday.