EDINBURGH (Reuters) - World champions New Zealand held off a game challenge to keep intact their 112-year unbeaten record against Scotland with a hard-fought 22-17 win at Murrayfield on Saturday.
The All Blacks outscored their hosts three tries to two but were given a tough test by a side who are still to beat them in 33 meetings.
Codie Taylor, Damian McKenzie and Beauden Barrett scored tries for New Zealand after the sides were deadlocked at 3-3 at half-time, while Jonny Gray stretched over for Scotland's first try and Huw Jones added a second three minutes from time.
Handling errors cost Scotland a real chance of a historic win but they kept the All Blacks pinned back for good parts of the game, starting with a quick tempo and keeping up the pressure right to the end when the visitors had two players in the sin-bin.
Scottish fullback Stuart Hogg broke through in the last minute to come within inches of a dramatic last-gasp try but was snagged by Barrett just short of the line.
Taylor opened the scoring with a break down the wing in the 45th minute and New Zealand looked to have finally found their rhythm when Sonny Bill Williams' grubber kick was dotted down by the speedy McKenzie just six minutes later for a 15-3 lead.
But after flank Sam Cane was sent to the sin bin, Scotland used the numerical advantage to break through with Gray going over in the 61st minute. Finn Russell converted to cut the deficit to five points.
The All Blacks got a third try some six minutes after that to silence a boisterous crowd, as Williams made a quick break with a classy off-load that McKenzie fed to Barrett, who outsprinted the defenders and then converted his own try to restore the 12-point lead.
A dramatic finale was set up when Jones dotted down after a clever tactical kick from Tommy Seymour with Hogg offering the hope of a historic win with his last-gasp burst that fell despairingly short.
It was the penultimate game of the All Blacks' end-of-season tour. They finish against Wales in Cardiff next Saturday after previous wins over the Barbarians, France and a French XV.
Scotland's three-test November programme ends on the same day with a match against Australia at Murrayfield.
(Reporting by Mark Gleeson; Editing by Rex Gowar and Christian Radnedge)