Scotland were a pass away from winning and had all the momentum and all the good ideas in the last quarter.
Such was the pressure the All Blacks were under, they had to play the last 20 minutes with 14 men - Sam Cane being binned for cynically killing the ball on his own line and then Wyatt Crockett making a needlessly dumb decision to come round the side of a ruck early.
But while the All Blacks weren't able to play on the front foot the way they wanted, or control the game or the ball as they hoped, they did show an incredible depth of character to hold together in that final quarter.
The Scots spent a fair bit of time inside the All Blacks' 22 and yet they only managed two try tries in the time they had a man advantage.
They needed three - so nearly got the last one - but some big defending and some big scrummaging enabled the All Blacks to hang in there - to turn the ball over when they really needed something to go their way.
But what mattered more was that they made three lightning strikes to score tries that were, in all honesty, against the run of play. That's the All Blacks, though, good enough to make their passes stick and nail their opportunities when they come up.
The killer came from Beauden Barrett after Sonny Bill Williams made the break and offloaded to Damian McKenzie.
It was maybe one of the more important tries of the year because Scotland, albeit one of world rugby's big improvers in the last few years, were a level, maybe two, above where they have been at any time since they last played the All Blacks in 2014.
They owned the first half. They had, after half an hour, almost 70 per cent of the possession and about the same again in territory.
And they were fearless and inventive in the way they attacked. They had no qualms about opening the game up from deep - seeing if they could find some space on the flanks to exploit.
More often than not they did too and when the ball got into the hands of fullback Stuart Hogg, he embarrassed more than a few All Blacks' tacklers who didn't have the pace or agility to get a hand on him.
The only thing missing for the Scots was that killer last pass or the necessary composure when they had the line at their mercy. They needed points.
They needed all that pressure to be sitting on the scoreboard and worming its way into potentially panicky All Blacks' heads. It's the concession of tries, even regularly penalties, that truly matters against the All Blacks who do the rope-a-dope better than any other team in the game.
They can look a little punch drunk, as if they are swaying on their feet, almost about to topple and then five minutes later have 14 points in the can and suddenly give the impression they are virtually unstoppable.
That's exactly what did happen after the break when boom-boom - first Codie Taylor was worked over in the corner and then a Sonny Bill Williams grubber saw Damian McKenzie touch down under the posts and turn the game on its head.
Or at least the All Blacks had some leeway, a little breathing space to ride out a Scottish tide that just kept coming.
Scotland 17 (J. Gray, H. Jones tries; F. Russell 2 cons, pen)
New Zealand 22 (C. Taylor, D. McKenzie, B. Barrett tries; B. Barrett con, pens)