Cook, who shared a 158-run fourth-wicket partnership with Joe Root, moved on to 105 not out at the interval with Ben Stokes on 22 and England led by 127 runs with six wickets in hand and four sessions of an intriguing match remaining.
Root was caught at long leg by Trent Boult off Matt Henry for 84 before Cook drove the same bowler straight down the ground for three to reach his 27th test hundred.
He celebrated his second century in two tests, which included 12 fours, after nearly two years without one in international cricket, raising his bat to the dressing-room as the crowd gave him a standing ovation.
England had resumed on 74 for two and Ian Bell was out to the third ball of the day for 29, pushing tamely at a wide ball from Tim Southee and edging the ball to wicketkeeper Tom Latham.
Cook, 32 not out overnight, defended resolutely and brought up his fifty off 122 balls while Root struggled to find the sweet timing he showed in making 98 in the first innings.
The New Zealand pace bowlers beat the bat a few times but Root remained unruffled, reaching his half century by sweeping spinner Mark Craig for his seventh four.
Root survived a huge shout for lbw off Boult in the last over before the interval following an unsuccessful review by the New Zealanders.
Root began to pepper the boundary after lunch and was closing in on the century he missed by two runs in the first innings when he hooked Henry straight down Boult’s throat on the boundary.
Stokes, who made a sparkling 92 on Thursday, struck a few powerful blows before rain forced the players off for an early tea. – Reuters
Original source: Cook smashes defiant century