Match ends, Republic of Ireland 1, Denmark 5.
The Republic of Ireland failed to reach the World Cup as Christian Eriksen's hat-trick gave Denmark an emphatic victory in the play-off to reach Russia 2018.
After a goalless first leg, the hosts made the perfect start by scoring after just six minutes as defender Shane Duffy nodded in his second international goal when the visitors failed to clear a free-kick.
But the Danes netted twice in the space of three first-half minutes, courtesy of Cyrus Christie's own goal and Eriksen's stunning strike.
That left the Republic - who could have gone further ahead after taking the lead, but saw striker Daryl Murphy flick an effort into the side netting and winger James McClean drive wide following a slick team move - needing to score twice more to qualify.
But in the second half Tottenham midfielder Eriksen curled in from the edge of the box and then thumped in from inside the area to secure his treble and seal the tie.
Former Arsenal striker Nicklas Bendtner came on with six minutes to go and slotted a late penalty after he was brought down as Denmark, who failed to qualify for Brazil 2014, booked their trip to Russia next year.
Hat-trick scorer Eriksen said: "It's an incredible feeling. We've been fighting for so long to get to the World Cup. We are very much looking forward to it. It's not often I score any hat-trick so of course it is incredible.
"I know how nervous I was all day and night. We got the ball, we played better than the first game."
- Relive Denmark's victory over the Republic of Ireland
- Which teams have qualified for the World Cup?
- What you need to know about the World Cup
Eriksen punishes individual errors
Martin O'Neill's Ireland side had lost just one of their previous 11 competitive games at home and they were heading to a World Cup for the first time since 2002 when Brighton's Duffy nipped in ahead of Leicester goalkeeper Kasper Schmeichel for the opener.
However, having decided to sit back on their advantage and play on the counter-attack, individual errors saw the game turn in Denmark's favour.
When the speedy Pione Sisto worked space on the left and played in Andreas Christensen, the Chelsea centre-back's effort came back off the post, but Christie was unable to react quickly enough to clear and only managed to send the ball into his own net.
With the Republic rattled, they conceded again just three minutes later. Burnley's Stephen Ward gave the ball away in his own half and the visitors constructed a swift attack that ended with Tottenham's Eriksen curling in via the crossbar.
The home side pushed forward in the second period, but Eriksen found space on the edge of the box to finish off a break for his second, before Ward's miss-control in his own area allowed the Spurs midfielder to slam home his side's fourth.
"The second one was the most technical one, better than the others," said the 25-year-old.
"Mentally I have grown up. I take the more clinical shot rather than passing. I am thinking more like a striker."
Eriksen now has 21 goals for his country, 11 of which came in this qualifying campaign.
With a minute remaining, there was still time for further disaster as McClean tripped Bendtner in the area and the striker stroked home the fifth Danish goal from the spot.
O'Neill and assistant Roy Keane agreed new contracts with the Football Association of Ireland back in October but questions are now likely to be asked as to whether they are the right men to take the country forward.
Danes continue impressive year
Veteran manager Age Hareide took over after Morten Olsen's failure to reach Euro 2016 and under his guidance the team end 2017 unbeaten, having claimed five victories and four draws.
They last suffered defeat over a year ago when they were beaten by Montenegro, but once they went ahead against the Republic they controlled the game, keeping possession and clinically taking their chances.
They could have had more than five, with former Wigan midfielder William Kvist forcing Darren Randolph into a stunning, full-stretch save low to his right, while the Middlesbrough goalkeeper also pushed away Sisto's drive.
"It was very good, especially when we came from behind," said Hareide. "We didn't get stressed. We tried to play and we got the goals.
"I am very pleased with the team and the performance. This is a difficult place to play football - scoring five goals against the Republic of Ireland does not happen.
"I was surprised. They played with a diamond and that gave us lots of space and I just say thank you very much.
"Eriksen is a fantastic player. An inspiration for those around him. He is a world class player. The lads stuck together and gave a fantastic performance in a difficult game."
Denmark, who have qualified for only the fifth time, will now wait to find out the result between Peru and New Zealand (Thursday, 02:15 GMT) to see whether they are in pot 2 or pot 3 for the tournament.
The first leg between the Peruvians and Kiwis ended goalless in New Zealand.
If the South Americans go out, Denmark will go into the higher pot as one of the second seeds alongside fellow European teams England, Spain and Switzerland.
Super Eriksen - the stats
- Republic of Ireland have failed to qualify for the last four World Cup finals.
- Ireland conceded five or more goals in a home game for the first time since October 2012 against Germany (6-1).
- Christian Eriksen has been directly involved in 14 goals in the World Cup 2018 qualification process (11 goals, three assists), 10 more than any other Denmark player.
- Eriksen has scored more goals in European 2018 World Cup qualifiers than any other midfielder.
- Cyrus Christie is the first player to score an own goal for Republic of Ireland since Ciaran Clark against Sweden in June 2016.
R. of Ireland
- 3ClarkSubstituted forLongat 71'minutes
- 18MeylerSubstituted forHoolahanat 45'minutes
- 22ArterSubstituted forMcGeadyat 45'minutes
- 17Stryger LarsenSubstituted forAnkersenat 54'minutes
- 20PoulsenSubstituted forCorneliusat 70'minutes
- 9N JørgensenSubstituted forBendtnerat 84'minutes
- 13M Jorgensen
- Szymon Marciniak
- Shots on Target
Second Half ends, Republic of Ireland 1, Denmark 5.
Attempt missed. Shane Duffy (Republic of Ireland) header from the centre of the box is close, but misses to the left. Assisted by Robbie Brady with a cross following a corner.
Corner, Republic of Ireland. Conceded by Peter Ankersen.
Attempt blocked. James McClean (Republic of Ireland) left footed shot from outside the box is blocked. Assisted by Daryl Murphy with a headed pass.
Goal! Republic of Ireland 1, Denmark 5. Nicklas Bendtner (Denmark) converts the penalty with a right footed shot to the high centre of the goal.
Penalty Denmark. Nicklas Bendtner draws a foul in the penalty area.
Penalty conceded by James McClean (Republic of Ireland) after a foul in the penalty area.
Andreas Christensen (Denmark) wins a free kick in the defensive half.
Foul by Aiden McGeady (Republic of Ireland).
Attempt saved. Andreas Cornelius (Denmark) left footed shot from outside the box is saved in the bottom left corner.
Attempt missed. James McClean (Republic of Ireland) left footed shot from outside the box is high and wide to the left. Assisted by Wes Hoolahan.
Foul by Pione Sisto (Denmark).
Wes Hoolahan (Republic of Ireland) wins a free kick in the defensive half.
Substitution, Denmark. Nicklas Bendtner replaces Nicolai Jørgensen.
Attempt missed. Andreas Cornelius (Denmark) header from the centre of the box misses to the right. Assisted by Christian Eriksen with a cross following a corner.
Corner, Denmark. Conceded by Shane Duffy.
Attempt missed. Shane Long (Republic of Ireland) right footed shot from outside the box is just a bit too high. Assisted by Wes Hoolahan.
Hand ball by Shane Long (Republic of Ireland).
Attempt missed. Pione Sisto (Denmark) left footed shot from outside the box is close, but misses to the right. Assisted by Christian Eriksen.