Joe Root completed his third test double century and was out for 226 as England built a 101-run first-innings lead over New Zealand on the fourth day of the second test.
Root shared a 193-run sixth wicket partnership with Ollie Pope, who also fell during Monday's second session for 75.
England was finally dismissed just before the scheduled tea break for 476, having batted for almost 163 overs to give itself a shot at winning the match and saving the series.
In an impressive display of concentration and stamina, Root's innings occupied more than 10-1/2 hours, 635 minutes, during which he faced 441 balls. It was a much needed knock for the England skipper whose captaincy had raised many questions affecting his batting.
He helped England from 24-2 on the second day to 458-7 when he was finally out about 30 minutes before tea.
Pope supported Root for 258 minutes in a partnership which carried England past New Zealand's first innings of 375, taking it from 262-5 to 455-5. Through their joint efforts England has a hope of winning the test and squaring the two-match series after New Zealand won the first test by an innings and 65 runs.
Root batted himself back to form through the third and fourth days, on a docile pitch at Seddon Park, through sheer force of will. He had made only 321 runs in 14 innings at an average of 26.5 since July and his last century came in the West Indies in February.
While the pitch was low and slow, it required watchfulness and fast run-scoring was difficult. Root deployed a range of dabs and flicks behind point and square to reach his double century from 411 balls.
His third double century in tests, following his 254 against Pakistan in 2016 and his 200 not out against Sri Lanka at Lord's in 2014, was his first as captain.
He matched Kevin Pietersen's record of three double centuries but lags behind Walter Hammond and Alastair Cook who both reached the milestone five times for England.
Pope was the first man out Monday, caught a little off guard by a steeper bouncer from Neil Wagner which he tried to pull. He met the ball high on the blade and it skied to Jeet Raval at deep-midwicket.
His long-time partner gone, Root lasted only one more over and fell to the bowling of left-arm spinner Mitchell Santner. He came down the pitch to drive but managed only to slap the ball to Henry Nicholls at deep cover.
Root has spoken throughout this series about the importance to England of crease occupation, a watchword of new coach Chris Silverwood. He provided a shining example with his almost tireless vigil over nearly two days in Hamilton.
After Root's dismissal, Wagner wrapped up the England tail, dismissing Chris Woakes, Jofra Archer and Stuart Broad in quick succession to finish with 5-124, the ninth five-wicket haul of his career and his second in consecutive innings.