Wales' 51-year wait for a win over New Zealand continued as the All Blacks edged a breathless Test in Cardiff.
Joe Rokocoko grabbed a brace of tries and Mils Muliaina also crossed as the visitors won the try count three-two.
But Wales, who scored in each half through Tom Shanklin and Mefin Davies, pushed the All Blacks all the way.
Gavin Henson reduced the deficit to a point with his second penalty five minutes from time, but Wales could not force a scoring position late on.
Wales threw everything at the All Blacks from the off and dominated the first quarter of an hour.
A great break from Stephen Jones in the sixth minute might have brought greater reward but the fly-half kicked his side ahead minutes later after a sustained period of pressure.
Scrum-half Dwayne Peel took a quick tap penalty five metres out and almost forced his way over, but with New Zealand offside Jones landed a simple penalty.
Daniel Carter levelled with one of his own and Jones missed a straightforward kick to regain the lead.
New Zealand showed their attacking threat when full-back Muliaina stepped inside his man and chipped ahead to the line, but Shanklin did well to cover the danger.
Moments later the wing - who scored four tries against Romania last week - set the crowd alight when he raced onto Jones' kick over the defence to touch down in the right corner.
Shanklin again showed his try-scoring prowess
The splendid Colin Charvis won a turnover and with little on outside him, Jones launched the kick, Shanklin beating the ponderous Casey Laulala in a race to the line.
Jones was unable to convert but landed another penalty after 26 minutes to make it 11-3.
But the All Blacks immediately hit back to cut the deficit to a point, some incisive handling seeing Muliaina send Rokocoko racing in for his 26th try in only his 22nd Test.
Carter converted and then nudged the visitors ahead with a superbly-struck penalty as Wales scrambled well to avoid further damage.
They were rewarded when Jones kicked his third penalty to give them the narrowest of half-time leads.
Wales extended that to 19-13 on the resumption when from a scrum close to the All Blacks line, some patient play by the pack saw hooker Mefin Davies driven over.
But the hosts were again unable to consolidate after scoring and Carter's deft offload saw Muliaina force his way over.
A long-range penalty attempt from Gavin Henson struck an upright and landed on the wrong side as far as Wales were concerned.
The All Blacks proceeded to cut loose from another turnover after 54 minutes when Rokocoko dummied to kick and then turned on the after-burners to leave Shanklin for dead.
At 23-19 up and the game becoming looser by the minute, New Zealand appeared to be gaining the upper hand.
But Wales were given a lifeline when replacement All Blacks centre Ma'a Nonu was yellow-carded for a blatant late shoulder charge on Henson.
Henson punished the offence to get Wales back to within a point as the final quarter dawned.
Carter's third successful penalty with 10 minutes left appeared to have secured victory, only for Henson's second penalty to give Wales late hope.
But despite winning a lineout in the All Blacks half in the last minute, Wales could not secure the ball and the visitors held out.
Wales: G Thomas (Toulouse, capt); T Shanklin (Blues), S Parker (Ospreys), G Henson (Ospreys), S Williams (Ospreys); Stephen Jones (Clermont-Auvergne), D Peel (Scarlets); G Jenkins (Blues), M Davies (Neath RFC), A Jones (Ospreys), B Cockbain (Ospreys), G Llewellyn (Narbonne), Dafydd Jones (Scarlets), C Charvis (Newcastle), M Owen (Dragons).
Replacements: Steve Jones (Dragons), Duncan Jones (Ospreys), R Jones (Ospreys), M Williams (Blues), G Cooper (Dragons), C Sweeney (Dragons), R Williams (Blues).
New Zealand: M Muliaina (Blues); D Howlett (Blues), C Laulala (Crusaders), A Mauger (Crusaders), J Rokocoko (Blues); D Carter (Crusaders), P Weepu (Hurricanes); T Woodcock (Blues), K Mealamu (Blues), G Somerville (Crusaders), C Jack (Crusaders), A Williams (Blues), R So'oialo (Hurricanes), R McCaw (capt, Crusaders), M Tuiali'i (Crusaders).
Replacements: A Oliver (Otago), C Hayman (Otago), R Thorne (Canterbury), M Holah (Waikato), B Kelleher (Waikato), M Nonu (Wellington), R Gear (Auckland).
Referee: Tony Spreadbury (England)