Corey Anderson's maiden Test century helped New Zealand reach 419-8 at stumps on the third day of the second Test against Bangladesh, a first innings lead of 137.
The day firmly belonged to the tourists as they resumed their innings on 107-3, although they lost Ross Taylor early on in Dhaka.
New Zealand dropped to 127-4 following ex-captain Taylor's exit when he was removed for 53 in the fourth over by Shakib Al Hasan.
That brought Anderson to the crease and his 140 fifth-wicket partnership with Kane Williamson, who had retired hurt on Tuesday, guided New Zealand past the 250 mark.
Williamson departed after a miscue to deep midwicket off the bowling of Abdur Razzak before Anderson followed eight overs later to leave the Black Caps on 287-6.
Anderson, competing in only his second Test, smashed 13 fours and two sixes in his 116 before being caught at extra cover by Sohag Gazi to give seamer Al-Amin Hossain his first Test wicket.
However, any hopes Bangladesh harboured of blowing away the tourists' tail-enders were extinguished as wicketkeeper BJ Watling (59 not out) steered the tail expertly.
Doug Bracewell (17) and Neil Wagner (8) held up the Bangladeshi charge before Kiwi spinner Ish Sodhi struck his first Test half century to sit unbeaten on 55 with Watling when stumps were called.