A 96th-minute Troy Parrott goal to complete his hat-trick booked Ireland a spot in the playoffs for next year's World Cup with a thrilling 3-2 comeback victory over their nearest Group F rivals Hungary in a must-win game in Budapest.
Higher-ranked Hungary just needed a draw to secure second place and led 2-1 at halftime thanks to goals from Daniel Lukacs and Barnabas Varga, but Parrott's second goal of the night on 80 minutes and last-gasp winner ended the heartbroken hosts' qualification hopes.
Parrott had described his double in Thursday's shock 2-0 win over Portugal that set up the dramatic finale as the best night of his life and was in tears after Sunday topped that.
"IT'S A FAIRYTALE"
"This is why we love football because things like this can happen. I love where I'm from, so this means the world to me," the AZ Alkmaar striker told national broadcaster RTE shortly after embracing his family in the stands.
"This is the first time I've cried in years... It's a fairytale, you can't even dream about something like that."
Hungary, who had high hopes of reaching a first World Cup in 40 years, got off to the perfect start when Lukacs flicked in a Dominik Szoboszlai short corner on four minutes, only for Parrott to equalise from the penalty spot on 15 minutes.
Caoimhin Kelleher kept the sides level with a fine close range save from Roland Sallai but could do nothing on 37 minutes when Varga chested the ball down with his back to goal just outside the box, swivelled and unleashed a stunning left-foot half volley into the top corner.
Ireland looked out of gas until Parrott broke through to equalise again with 10 minutes to go and stabbed home his fifth goal in two games with a finish reminiscent of Robbie Keane's famous equaliser against Germany the last time Ireland played in a World Cup in 2002.
He was mobbed by exultant teammates and substitutes as Ireland moved within two single-leg playoff games in March from a trip to the United States, Mexico and Canada.
Portugal finished top of Group F on 13 points after a 9-1 win over bottom-placed Armenia, three points clear of the Irish.