AUCKLAND, New Zealand (AP) — New Zealand's Martin Guptill scored a century to lead the hosts to 314 batting first against India in Saturday's third match of a five-match series.

India, who trail 2-0 and have to win to keep the series alive, fought back strongly in the second half of the innings to restrict New Zealand's total.

At 165-1 in the 30th over, New Zealand was looking at a score in the mid to high 300s on a fast, bouncy pitch at Eden Park, which is known for its queer shape and short boundaries.

Instead, the home team labored past 300 with nine wickets down in the 49th over and lost its last wicket to the last ball of the innings.

Though he opened his innings with a four from the first ball of the match, Guptill ground out only 30 runs in the first 15 overs and took 80 balls to post his half century.

But he became more fluent from that point and added his second 50 from 43 balls, mostly during a record partnership of 153 with Kane Williamson (65) for the second wicket. The stand eclipsed the second-wicket record for New Zealand against India of 138, set by Nathan Astle and Stephen Fleming 12 years ago.

India once again showed its ability —displayed at various stages of the series — to break New Zealand's momentum just as its batsmen seemed to be getting on top.

Captain Mahendra Singh Dhoni used his spinners judiciously through the middle of the innings and reined in New Zealand's scoring rate as it was about to become oppressive.

Ravichandran Ashwin bowled his 10 overs consecutively at a cost of 47 runs and Ravindra Jadeja, who also bowled 10 overs, took 2-47, dismissing Guptill in the 38th over and, critically, during New Zealand's batting powerplay.

Guptill became briefly bogged down on 99, taking six balls to add the final run which brought up his century during a powerplay that New Zealand squandered. He reached his century from 123 balls with 11 fours and a six.

Williamson was out in the 33rd over and New Zealand took the risk of promoting big-hitting all-rounder Corey Anderson to No. 4 in the hope he would take advantage of the powerplay, then two overs away.

Anderson holds the record for the fastest century in one-day internationals but didn't make it to the powerplay overs, lasting only five balls before he was bowled by Ravichandran Ashwin for 8.

New Zealand's innings then entered a dizzying decline which was only reversed in its late stages by the efforts of wicketkeeper Luke Ronchi, who made 38 from 20 balls, and Tim Southee, who made 27 not out from 23.

New Zealand's senior middle order failed. Captain Brendon McCullum was out for his second-straight duck and Ross Taylor fidgeted at the crease for 43 minutes before he was out for 17.

From Guptill's dismissal, New Zealand lost six wickets for 64 runs in the space of 10 overs.