CHICAGO - Ireland repelled an extraordinary second-half rally to shock New Zealand 40-29 and post their first win over the All Blacks in 29 matches spanning 111 years on Saturday.

New Zealand rallied from 30-8 down after 47 minutes to close within four points at 33-29 when center Robbie Henshaw broke their line for Ireland’s fifth and match-winning try in the 76th minute.

Three years ago in Dublin, the All Blacks broke Irish hearts when they rallied from 19-0 down - the biggest comeback in their history - to deny Ireland an historic win with an injury-time try and conversion.

Get Breaking News Delivered to Your Inbox

They seemed on the verge of repeating that at Soldier Field, where they closed within four points with 16 minutes remaining, but Ireland remained resolute to write their names into rugby history.

In doing so, they also ended the All Blacks’ record run of 18 straight test wins, and set up a potentially thrilling rematch in Dublin in two weeks.

Ireland played with remarkable skill and passion to stun the All Blacks with three first-half tries which gave them a 25-8 lead at halftime. Their fourth try to winger Simon Zebo made the lead 30-8, and the first time Ireland had notched 30 against New Zealand.

With little more than half an hour remaining, an historic Irish victory seemed assured.

But the All Blacks, who had barely been able to get their hands on the ball, mounted a determined comeback when they ensured more secure possession.

With tries to replacement scrumhalf TJ Perenara, fullback Ben Smith and debutant lock Scott Barrett, they sawed into Ireland’s lead and moved within a try’s breadth of another great comeback victory.

It seemed at that point the Irish were spent. Their robust defense was cracking, and New Zealand gained the momentum it needed to uphold an unbeaten run stretching back to 1905.

Ireland fans celebrate their team’s 40-29 victory during the international match between Ireland and New Zealand at Soldier Field on November 5, 2016, in Chicago. Phil Walter/Getty Images

But with a piece of brilliance, the Irish broke out of their own half and, kicking ahead, forced an error from All Blacks flanker Ardie Savea, who was caught behind his own tryline. From the ensuing five-meter scrum, No. 8 Jamie Heaslip detached, and passed to Henshaw, who ran straight and hard past three defenders to score.

Ireland fans who overwhelmingly outnumbered New Zealanders among the 64,000-strong crowd began a delirious celebration. In the hometown of the Chicago Cubs, who ended their 108-year losing streak by winning baseball’s World Series this week, they went one better and stopped a 111-year run of outs.

And they left New Zealand with no excuses. They outmuscled and generally outplayed the world champion All Blacks. New Zealand’s discipline was fractured, and through handling errors and tactical mistakes they failed to keep Ireland under any kind of pressure.

Their rally, when it came, was determined, but it was too late, and it was again errors near the end, especially a pass from flanker Liam Squire which failed to find winger Julian Savea, which stalled their revival.

“It was a bridge too far,” All Blacks captain Kieran Read said. “It was the first half start from us that really let us down. You can’t give a quality side like Ireland the lead we gave them tonight.”

New Zealand scored the first try when center George Moala pounced on a ball knocked back over the Ireland tryline.

But a try to flanker Jordi Murphy from a superbly mounted rolling maul in the 10th minute gave Ireland back the lead, and they didn’t concede it for the remainder of the match. Murphy and fellow back-rower CJ Stander, who scored in the 17th, took advantage of a 10-minute spell when New Zealand was reduced to 14 men by the sin-binning of prop Joe Moody.

Murphy was forced from the field with a serious injury in the 26th, forcing a delay in play which made the match one of the longest in rugby union history. New Zealand also lost center Ryan Crotty in the same passage of play to what seemed a serious hamstring injury.

Ireland put the All Blacks under almost intolerable pressure when scrumhalf Conor Murray, one of its best players, broke the fringe defense to score a superb solo try before halftime.

Zebo exposed the All Blacks’ defense on the blindside in the 49th, and gave Ireland a lead which seemed insurmountable.

But the lead began to creak under New Zealand pressure, as first Perenara then Smith scored. When Barrett, brother of flyhalf Beauden, scored in the 64th, a stunning turnaround seemed possible, even likely.

But Ireland resisted and, continuing to play with enterprise, fashioned Henshaw’s try and immortality.