New Zealand will face Peru in a home-and-away tie in November to qualify for the 2018 World Cup in Russia.
The Oceania champions' opponents in an intercontinental home-and-away play-off in November were confirmed after the conclusion of South American qualifying on Wednesday.
The biggest casualties were Chile, who had been third on the table and in line for an automatic qualifying spot.
But they fell 3-0 to the runaway winners of the group, Brazil, to tumble to sixth.
Peru had been occupying the play-off position of fifth going into their match in Lima, at an altitude of 1550 metres.
They looked in trouble when trailing Colombia 1-0, but kept alive their hopes of a first finals appearance since 1982 when Brazil-based striker Paolo Guerrero equalised in the 76th minute.
The 1-1 draw was enough to edge Peru past Chile on goal difference.
The four automatic qualifiers were five-time World Cup champions Brazil, two-time winners Uruguay, Argentina and Colombia.