Before the late salvo, the Maori had been held scoreless in the second spell by a Japanese side playing with equal parts passion and power. The Cherry Blossoms looked like handing Colin Cooper's team their first loss since 2012 and even the coach would have probably admitted the deserving nature of such a result.
Japan started fast and, aside from one costly lapse, they spent the closing stages in charge. They enjoyed the better of both the ball and field position, completely controlling the set piece and shutting down most Maori threats before they eventuated.
Fortunately for the Maori, Japan failed to show the clinical edge needed to turn their dominant display into victory. But Japanese rugby still seems on the upswing.
Before the 61-21 defeat last week, Japan had run off 10 straight tests wins on the trot, including a victory over Italy earlier in the year. They boast in Eddie Jones a coach of real international quality and they backed the plans laid by the former Wallabies' boss, grinding down the Maori by stringing together phases and attacking around the fringes.
The visitors were victims of their own play, though. After scoring at will a week ago, the Maori appeared to expect a similarly porous defence from the home side.
Instead of laying the platform with hard yards up front, they eschewed such a patient approach and seemed content to throw it wide at every opportunity. But, aside from a couple of first-half tries that came against the run of play, Japan defended stoutly and, until the final seconds, never allowed their opposition enough possession to strike.
Such a strategy was more than evident in the first quarter of the match. Having shown more attacking endeavour than the Maori in the opening stages, Japan's forwards settled into their work and denied the tourists any ball in the attacking half.
Such was their supremacy, Japan were turning down penalties and appeared to grab a try they had truly earned, only for the TMO to deny Keita Inagaki after finding an obstruction.
The Maori soon made Japan pay for their profligacy, striking quickly through bursts of pace from hooker Codie Taylor and fullback Nehe Milner-Skudder. But just when the team's attention would have turned to halftime, Akihito Yamada danced down the left wing to pull his side back into the game.
Mistakes were creeping into the Maori game and, after a kick was charged, another powerful scrum from Japan was pulled down and left referee Angus Gardner no choice but to award a penalty try.
The Maori were continuing to fling the ball around but struggling to find success, allowing Japan to play at the right end of the field and allowing Ayumu Goromaru to level the game. Pryor's penalty cessation with 10 minutes to play saw Japan seize the lead but the Northland flanker soon found redemption.
"We were just trying to hold the ball and pick up the tempo," Ngatai said of the tactics late. "I thought we were never going to get there but, in the end, we were lucky with that try."
Japan 18 (A. Yamada, penalty tries; A Goromaru con, 2 pens)
Maori All Blacks 20 (C. Taylor; N. Milner-Skudder, D. Pryor tries; I. West con, pen)
HT: 5-15