The result ends the All Blacks 18 test winning run which was the most by a tier one test nation.

The All Blacks captain Kieran Read told Sky TV he didn't think the side "turned up with the right attitude."

"We talked about it all week but when you come into a test match you've got to turn up with the right attitude and be physical...they came out and really took it to us and we took our time to react to that and you can't leave it till the last 20 minutes every week to react."

Ireland captain Rory Best said "we know New Zealand are a great side and we knew we would have to go out and attack them,"

"We put in so much work over the last couple of weeks and this win has been a long time coming, but history has been made and we're absolutely ecstatic.

"Thanks to the fans - the atmosphere here has been amazing, it's been like a home match," Best said.

Ireland had New Zealand on the ropes early in the match and made them pay when prop Joe Moody was sent to the sin bin after eight minutes for a foul tackle.

The All Blacks scored the first try in the fifth minute through centre George Moala but when they were down to 14 men, Ireland hit them with two tries by their back row.

Ireland kicked two penalties into touch close to the New Zealand line and from the lineouts, first Jordi Murphy then CJ Stander went over.

Following a Beauden Barrett penalty, the Irish scored a third try after 32 minutes when scrumhalf Conor Murray fielded a high kick from Johnny Sexton and was brought to ground near the line but recovered to scurry over under the posts.

Ireland's 25-8 halftime lead was equal to the previous biggest deficit conceded by the All Blacks at the interval of any test match when Australia led them 20-3 in 2011.

New Zealand suffered again early in the second half with the Irish routine of penalty to touch, lineout and driving the ball over with winger Simon Zebo scoring as the defence was caught a man short on the blindside to give Ireland 30 points, equalling their highest ever score against New Zealand.

Replacement scrumhalf TJ Perenara cut the deficit with a try from Dane Coles's off-load in the 51st minute, converted by Barrett as the All Blacks threatened a comeback.

A try by fullback Ben Smith in the corner, beating last- ditch attempts to stop him by Zebo and Andrew Trimble, brought New Zealand within eight points after the conversion.

A Murray penalty was followed by New Zealand's fourth try in the 65th minute, scored by replacement forward Scott Barrett on his test debut with brother Beauden converting, that put the All Blacks within four points.

However, the fighting Irish, who had faced the New Zealand haka before kicking by forming a figure of eight in remembrance of Foley who died aged 42 last month, had the last word.

Centre Robbie Henshaw broke through a flailing defence to score with replacement back Joe Carbery converting.

Ireland, whose best result in 28 previous games against New Zealand was a 10-10 draw in 1973, had come agonisingly close to ending the drought in Dublin in 2013, conceding a converted try at the death that allowed the All Blacks to win 24-22.

The teams meet again in Dublin in a fortnight after New Zealand visit Italy and Ireland host Canada next weekend.