It was a mixed performance by the All Blacks XV who were unable to reproduce the form they showed in their win over Ireland A last weekend.
Starting with a penalty to the corner from a Barbarians penalty, the All Blacks XV attempted to drive but when stopped the ball was released for first five-eighths Damian McKenzie to get a long pass to wing Bryce Heem to score.
Playing with their usual running intent, the Barbarians got into the New Zealand 22 where flanker Tom Christie was sin-binned for cynical play.
Barbarians No8 Zac Mercer twice looked to have scored, but the first was ruled out for a knock-on and the second by an earlier penalty. However, in the 15th minute his third attempt from a scrum was successful.
The New Zealanders secured another penalty and kicked for the corner. From the lineout No8 Luke Jacobson tapped the ball down and from the resulting drives at the line lock Josh Dickson scored after 25 minutes.
However, the Barbarians responded when hooker Camille Chat tidied up ball at a lineout and drove to within a metre of the line and it was lock Lekima Tagitagivalu who crossed for the try.
Second five-eighths Alex Nankivell impressed from the outset with some strong running and after a midfield break the resulting play produced a penalty for McKenzie to once again kick for the corner. A long throw resulted and it was Nankivell who tidied to get the momentum to get over the line for the try.
The All Blacks XV looked to build their play from the restart but a big tackle on centre Levi Aumua saw the ball drop and halfback Tawera Kerr-Barlow looked to link with wing Teddy Thomas. From the resulting play Mercer went blind and allowed centre Joe Marchant to score and give the Barbarians the halftime advantage of 21-17.
From another close-quarter lineout, hooker Brodie McAlister wasn't able to make it over the line. The All Blacks XV moved the ball to midfield where fullback Shaun Stevenson moved outside his marker, dummied to wing Leicester Fainga'anuku, before scoring in the corner.
A kick by halfback Brad Weber into the box was fielded by Thomas and the Barbarians ran the ball. First five-eighths Antoine Hastoy kicked ahead where Marchant claimed the ball, kicked over Stevenson and in the tackle managed to offload to Thomas who scored in the 51st minute.
Former All Black and Barbarians wing George Bridge made a inside break and while tackled, the Barbarians secured the ball allowing Tagitagivalu to take the ball ahead and substitute halfback Rhys Webb was on hand to score.
Stevenson was sin-binned with 10 minutes left for shouldering Webb as he attempted to chase a kick ahead. When the Barbarians attempted to run the ball, Thomas lost the ball in a tackle and Bailyn Sullivan secured the ball and ran in the try.
Penalties conceded by the home side allowed the All Blacks XV to look to their lineout to get them a win but a steal by blindside flanker Lauret Wenceslas denied them and allows the Barbarians to hold on.
Scorers: Barbarians 35 (Zac Mercer, Lekima Tagitagivalu, Joe Marchant, Teddy Thomas, Rhys Webb ; Antoine Hastoy 4 con; Ihaia West con) All Blacks XV 31 (Bryce Heem, Josh Dickson, Alex Nankivell, Shaun Stevenson, Bailyn Sullivan tries; Damian McKenzie 3 con). HT: 21-17