All Whites coach Danny Hay feels Peru will provide the ultimate preparation for his team ahead of the win-or-bust clash with Costa Rica in mid-June.
After plenty of speculation, with the prospect first reported by the Weekend Herald three weeks ago, the fixture with Peru was confirmed on Friday byNew Zealand Football.
The match will be played in Barcelona on June 6 (NZT), nine days before the intercontinental playoff in Qatar. The game will be staged at the home of La Liga club Espanyol and should attract a significant crowd, with a large expatriate South American population in Spain.
It's an ideal scenario for an All Whites side seeking the best possible test leading into the showdown with Costa Rica, who qualified fourth from the North and Central American confederation, behind Canada, Mexico and the United States.
"It is going to be massive," said Hay. "What an acid test for us, which is exactly what we need and want. We need to find our own strengths and weaknesses, how we deal with adversity, leading into what is a massive game against Costa Rica. Peru are the perfect opponents to really find out what we need."
In normal circumstances, it would be near impossible for NZF to arrange a game with such high calibre opposition - Peru are ranked 22nd by Fifa, nine places ahead of Costa Rica - given costs and calendar congestion.
But the stars have aligned this time.
Peru are preparing for their own intercontinental playoff, after finishing fifth in South America qualifying, and will face either Australia or United Arab Emirates on June 13. That meant they were seeking an opponent with a similar style to the Socceroos, which opened the door for the New Zealand (ranked 101 by Fifa).
"They are building towards the same sort of thing as us, they are trying to make the World Cup and they won't take this lightly so it is invaluable for us," said Hay. "This won't be just like another normal friendly."
There is also history between the two nations, after the memorable – and sometimes spicy – series in 2017, with Peru prevailing 2-0 in Lima after a 0-0 draw in Wellington.
With an eye on Costa Rica, Hay said the South American team offered many similar challenges.
"They are very dynamic, quick on the counter and strong at set-piece time," said Hay. "And that is what we are going to face against Costa Rica."
Hay also pointed to Peru's highly experienced squad.
"They have a huge amount of caps under their belt. [Just like] Costa Rica, they are a team that has been together for a long time, know each other inside out, and have been through moments of adversity together. All of that will count."
The All Whites have one more warm-up match to confirm, in Doha on June 10 (NZT). Hay said there were a "couple of options on the table" and it would be another highly ranked team.
The All Whites will be in camp in Spain from May 24, with players to arrive as they are released from their clubs. The full squad will assemble by May 31, the official start of the Fifa window.
However Hay confirmed that PSV Eindhoven midfielder Ryan Thomas wouldn't be in contention, as he continued to battle a knee injury.
"He has aggravated his knee and is still really struggling with it, even though he has tried to come back and get a little bit of training," said Hay. "It would have been a long shot anyway, with a guy that hasn't played any football for so long, but the fact is that he is still struggling."