Jimmy Neesham and Colin de Grandhomme came to unbeaten New Zealand's rescue with a 132-run partnership to lift the 2015 World Cup finalist's total to 237-6 against Pakistan.
Left-arm seamer Shaheen Afridi (3-28) had helped reduce the Black Caps to 46-4 and 83-5, when Kane Williamson was out for 41.
Neesham finished on his highest ODI score, 97 not out from 112 balls. He hit five fours and three sixes, including smashing a six off the last ball of the innings.
Shaheen Shah Afridi (2L) celebrates with teammates after the dismissal of Ross Taylor at Edgbaston. AFP
De Grandhomme was run out, too slow against Mohammad Amir's throw while going for a second run, to finish on a 71-ball 64.
New Zealand narrowly chased down South Africa's 241-6 on the same Edgbaston wicket and this score, while it appears to be a sub-par total, could prove a nervy pursuit for seventh-place Pakistan in a must-win game.
New Zealand would advance to the last four with a win.
Pakistan fans pose for a photograph before the match. Andrew Boyers/ Reuters
If New Zealand win they will join title holders Australia in the semi-finals.
"The cloud is going to hang about a bit and it's cold. There might be a bit of swing but we'll have a bat," said Williamson.
"There was consideration to making some changes but we've kept it the same again. This is always a tough game. Pakistan are a very strong side but we are looking to build on our displays.
"Naturally the support that Pakistan have gives a great atmosphere, we are looking forward to it. Every game has similar feelings riding on it -- we are looking to play the Cricket we want."
Pakistan captain Sarfaraz Ahmed said he would also have chosen to bat first.
"Mohammad Amir is bowling very well. We put in a complete team performance last time but our catching is a concern. Pakistan can do anything, we go match by match."
Teams:
Pakistan: Sarfaraz Ahmed (captain), Fakhar Zaman, Imam-ul-Haq, Babar Azam, Haris Sohail, Mohammad Hafeez, Imad Wasim, Shadab Khan, Wahab Riaz, Mohammad Amir, Shaheen Shah Afridi
New Zealand: Kane Williamson (captain), Martin Guptill, Colin Munro, Ross Taylor, Tom Latham, Trent Boult, James Neesham, Colin de Grandhomme, Mitchell Santner, Lockie Ferguson, Matt Henry
Umpires: Paul Reiffel (AUS) and Bruce Oxenford (AUS)
Match referee: Richie Richardson (WIS)
Agence France-Presse