Dublin - The Republic of Ireland missed out on automatic qualification for Euro 2020 as a 1-1 draw with Denmark in Dublin on Monday secured the visitors' place at next summer's showpiece.
Switzerland also booked their place at Euro 2020 with a 6-1 win over Gibraltar to claim top spot in Group A.
Ireland still have a chance to play in the Euros on home soil with Dublin one of 12 host cities, but need to come through two playoff matches in March.
Martin Braithwaite's strike for Denmark 17 minutes from time left Mick McCarthy's men needing to score twice. Matt Doherty's first international goal was too little, too late.
"Overall I'm very pleased with the performance and very proud of the players, particularly after conceding, to push them right to the limit," McCarthy told Sky Sports.
"Play like that in the playoffs and we can beat anybody."
The hosts were seeking revenge for the 5-1 victory in Dublin two years ago that sent Denmark to the 2018 World Cup.
However, in six meetings between the sides over the past two years Ireland have scored just three goals. A lack of cutting edge cost them again.
Ireland scored just seven goals in eight qualifiers in total, including two meetings with Gibraltar.
"You need to score goals to win games and we haven't scored enough," said Doherty. "It was a tough group, we went all the way and we have to make sure we are right in March."
The hosts looked the most likely to make the breakthrough in a first half of few clear chances.
Conor Hourihane had the best of them but fired too close to Kasper Schmeichel as he insisted on taking the shot with his stronger left foot leaving only a narrow angle.
In contrast to recent meetings between the sides, Denmark were happy to sit back and force Ireland to break them down, knowing a point would be enough for qualification.
"We were terrible," admitted Danish captain Schmeichel. "We didn't hit anything that we tried to today. We had to rely on our grit and or determination."
However, the Danes produced the one moment of quality they needed when Braithwaite met Henrik Dalsgaard's cross on the stretch.
"We had to ride our luck at times but you need that when you are fighting for qualification," added Schmeichel.
Denmark can look forward to games at home in Copenhagen at the Euros.
"It means the world because we are a very small nation so the chance of playing games at home in a major tournament is amazing, it's unique," said Schmeichel.
Switzerland made sure they beat the Danes to top spot in the group by hitting Gibraltar for six.
Granit Xhaka was among the goalscorers as he put his woes at club level to one side after being stripped of the Arsenal captaincy due to his public run-in with the club's fans.
Euro 2020 qualifying results on Monday:
Republic of Ireland 1 (Doherty 85) Denmark 1 (Braithwaite 73)
Gibraltar 1 (Styche 74) Switzerland 6 (Itten 10, 84, Vargas 50, Fassnacht 57, Benito 75, Xhaka 86)
Sweden 3 (Andersson 29, Svanberg 72, Guidetti 80) Faroe Islands 0
Spain 5 (Fabian Ruiz 8, Gerard Moreno 33, 43, Rus 45+1-og, Oyarzabal 90+2) Romania 0
At Ta' Qali, Malta
Malta 1 (Fenech 40) Norway 2 (King 7 Sorloth 62)
Liechtenstein 0 Bosnia and Herzegovina 3 (Civic 57, Hodzic 64, 72)
At Palermo, Italy
Italy 9 (Immobile 8, 33, Zaniolo 9, 64, Barella 29, Romagnoli 72, Jorginho 75-pen, Orsolini 78 Chiesa 81) Armenia 1 (Babayan 79)
Greece 2 (Mantalos 47, Galanopoulos 70) Finland 1 (Pukki 27)
Playing on Tuesday, November 19 (21:45 SA time):
Netherlands v Estonia
At Frankfurt, Germany
Germany v Northern Ireland
Wales v Hungary
At Trnava, Slovakia
Slovakia v Azerbaijan
Poland v Slovenia
Latvia v Austria
North Macedonia v Israel
Belgium v Cyprus
At Serravalle, San Marino
San Marino v Russia
At Glasgow, Scotland
Scotland v Kazakhstan
Played on Sunday:
Kosovo 0 England 4 (Winks 32, Kane 79, Rashford 83, Mount 90+1)
Bulgaria 1 (Bozhikov 56) Czech Republic 0
Serbia 2 (Tadic 9-pen, Mitrovic 56) Ukraine 2 (Yaremchuk 32, Besedin 90+3)
Luxembourg 0 Portugal 2 (Fernandes 39, Ronaldo 86)
Moldova 1 (Milinceanu 56) Iceland 2 (Bjarnason 17, Sigurdsson 65)
At Andorra la Vella
Andorra 0 Turkey 2 (Unal 17, 21-pen)
Albania 0 France 2 (Tolisso 9, Griezmann 30)