Retiring Ross Taylor has achieved the perfect send-off from test cricket, taking the final wicket, as New Zealand beat Bangladesh by an innings and 117 runs in Christchurch.
With light fading, captain Tom Latham threw the ball to Taylor and three deliveries later had his third test wicket, as the skipper caught Ebadot Hossain to seal victory.
The moment provided a poetic finale for 37-year-old Taylor and the Blackcaps, who bowled Bangladesh out for 278 in their second innings, despite a spirited century from Litton Das.
Kyle Jamieson finished with the best bowling figures of the second innings with 4/82, backed up by Neil Wagner with 3/77.
Wrapped up inside three days, the victory draws the series at 1-1, after New Zealand's shock defeat at Mt Maunganui last week, and gives the Blackcaps a valuable 12 points for the new World Test Championship cycle.
Enforcing the follow-on after bowling Bangladesh out for 126 on day two - earning a lead of 395 runs - they took to Hagley Oval needing 10 wickets in three days to level the series.
Bangladesh openers Shadman Islam and test debutant Mohammad Naim blunted the new ball, nearly batting through the first hour without loss.
But after taking a backseat to Trent Boult and Tim Southee on Monday, Jamieson broke through for the Blackcaps, with Tom Blundell taking an outstanding catch down legside to remove Shadman for 21.
Blundell had come under fire for his performances as Blackcaps wicketkeeper since taking over from the retired BJ Watling, but his displays with both gloves and bat - scoring an unbeaten 57 in New Zealand's first innings - will appease his critics before the two-test series against South Africa starting next month.
Batting at No.3, Najmul Hossain Shanto engaged in battle with Neil Wagner, as the seamer employed his trademark short-pitched gameplan against the left-hander.
Shanto had success against Wagner, racing to 29 from 35 balls, with 26 of those runs coming in boundaries. But as he so often does, Wagner had the last laugh, removing Shanto with a bouncer hooked straight to the hands of Boult before lunch.
Naim (24) and captain Mominul Haque (37) frustrated the Blackcaps, before a stunning catch from Latham broke Bangladesh's third-wicket stand.
After Latham took third slip out, the captain flung himself to his left from second slip and reeled in a one-handed catch that ended Naim's 98-ball vigil of 24 for Southee's first wicket.
Wagner then took the prized wicket of Bangladesh skipper Mominul, as a regulation edge flew through to Taylor at first slip.
The strike saw Wagner move to 234 test wickets for the Blackcaps, overtaking Chris Martin into fifth among the Blackcaps' all-time leading wicket-takers.
Wagner had his third wicket before tea by bouncing out Yasir Ali for two, caught by Latham, to have the tourists 128/5 - still 267 runs from forcing the Blackcaps to bat again.
As Bangladesh reached tea at 152/5, New Zealand had two hours of the final session to win inside three days.
Bangladesh counterattacked, as Das and Nurul Hasan (36) added a century stand for the sixth wicket. Reaching 50 runs stand in 67 balls, the pair needed only 30 more to double their partnership.
Das kept the scoreboard ticking over to reach his half-century in 69 balls, with Nurul hanging around at the other end.
An inspired bowling change from Latham saw Daryl Mitchell pick up his second test wicket, having Nurul caught by Wagner running around from mid-off.
Mehidy Hasan Miraz came and went for three, also falling to a Latham catch, this time off the bowling of Jamieson.
Running out of partners, Das reached triple figures, bringing up his second test century from 106 balls, with his second 50 runs coming in just 37 deliveries.
But Das' stay at the crease came to an end just two runs later, as Jamieson trapped him leg before wicket for his third wicket, and then had a fourth, when Shoriful Islam was caught by Southee at mid-off for a duck.
And with the new ball just one over away, Latham gave Taylor the chance for the perfect farewell to test cricket.
Taylor bows out of test cricket with a New Zealand record 7683 runs at an average of 44.66, including 19 centuries and a best of 290.
He'll also finish with a bowling average of 16, taking three wickets from his 112 tests, finishing his red-ball career with his final scalp.
Taylor's international career will end later this summer, signing off with one-day series against Australia and the Netherlands.
NZ 521/6 declared (Latham 252, Conway 109, Shoriful 2/79, Ebadot 2/143)
Bangladesh 126 (Yasir 55, Boult 5/43, Southee 3/28) & 278 (Das 102, Jamieson 4/82, Wagner 3/77)
NZ win by an innings and 117 runs