It all depended on Rehman, but he did not get holdof an attempted pull shot and Guptill took a safe catch in the deep to put the spirited Kiwis back in the hunt for a place in the last four ahead of their next game against England on Monday.
The left-hander's century arrived off 179 balls but he had two slices of luck on 70 and 86, with Iain O'Brien failing to holda return catch and Jesse Ryder dropping a chance at short leg off Vettori's left-arm spin.