Ireland were unable to secure their place at Euro 2020 as they came out the wrong side of a 2-0 result against Switzerland at the Stade de Geneve.
Haris Seferovic's 16th-minute strike proved the difference between the two sides until injury time, before the home side sealed the win thanks to a Shane Duffy own goal.
Mick McCarthy’s side ended the game with ten men following captain Seamus Coleman’s 76th-minute red card, which led to a penalty that was subsequently saved by Darren Randolph.
The result sees the Swiss put one foot in next summer’s showpiece, leaving Ireland battle it out with Denmark in Dublin next month.
By the time kick-off arrived, the rain had stopped in Geneva and the ball appeared to move about the sodden turf quite freely, even if a few players took a moment or two to get used to the conditions underfoot.
Ireland opted for some early long balls to send the Swiss back towards their own goal, but it was merely a moment or two of an inconvenience before the home side started to take control of the game.
James McClean left his mark on the match within three minutes, or rather on Stephan Lichtsteiner, as the Derry man clothes-lined the veteran midfielder.
The resulting free-in was easily dealt with but it would become a bit of a theme over the opening ten minutes as Switzerland dictated play and looked dangerous at every venture forward.
Ireland's experimental defensive system looked a bit haphazard as Stevens and McClean were both bombing down the left at every opportunity, while Coleman tried to get forward on the right.
The skipper was a bit too eager perhaps in those early exchanges with Whelan forced to sit in to protect John Egan and Shane Duffy.
Organised chaos was how Egan described his side’s defensive stragegy at club Sheffield United and there was a sense that the manager gave the Blades duo licence to play with the same freedom.
Granit Xhaka was first to test Darren Randolph as early as the sixth minute; his left-foot shot from distance was turned around the post.
Ireland did manage a corner in the 12th minute but the Swiss goal remained very much untroubled as the home side dealt with the ball into the box.
After 15 minutes, the Swiss appeared in complete control and sustained pressure allowed Fabian Schar to step into the attack, as he had done so well in Dublin.
The Newcastle defender combined well with Xhaka but the Ireland defence dealt with anything that came into the box – this time Egan with the strong header clear.
But one minute later the Swiss took a deserved lead as Seferovic smashed the ball home from just outside the box.
It all came from a half-cleared header from Jeff Hendrick, which was then worked back into the space as Manuel Akanji comfortably beat Whelan in the air.
Xhaka was on hand to get a vital touch ahead of Hendrick, who did not anticipate the ball coming back, before it fell at the feet of the big striker.
One touch to take it across Shane Duffy, before firing the low effort beyond Randolph - Duffy’s desperate lunge not enough to put the striker off.
Ireland looked to bounce back and Aaron Connolly did manage to get clear two minutes later, the young striker running on to a long ball, but he was sent wide and ended up smashing the ball across the face of the goal with no one in support.
Switzerland maintained their dominance but noticeably playing with a bit less intensity, keeping their shape and remaining patient in attack.
Ireland, on the other hand, were trying to get the ball forward quickly, but the centre-forward pairing were getting little success and struggling to link up with each other.
McCarthy made a formation change with James McClean sent over to the right side, while Coleman slotted back into a more traditional four-man defence.
But it was the Swiss who came closest to adding another, as Lichtsteiner was given the freedom of the park to cut in from the right and arrow a low effort just wide of Randolph’s left post.
Ireland's best chance came on the half-hour mark as a long ball was lifted to the far post from the right flank, and while Shane Duffy was arriving in the ideal position to attack it, Egan had just got in ahead and could only help a weak ball towards goal, by which stage two Ireland players had drifted offside.
Ireland were at least buoyed by the bit of forward momentum and again worked the ball in from the right two minutes later, allowing Stevens to run onto it.
A clear look at goal for the former Shamrock Rovers defender but he could only manage to blast the ball high over the bar.
In the 37th minute, Schar's shot from outside the box had Randolph scrambling across his goal, and he probably just about had the curling effort covered as the ball flew mere millimetres past the post.
Three minutes later, Schar took a knock on another of his forward forays, but Ireland broke at pace and won a corner, much to the disapproval of the home vocal supporters.
Duffy connected well from the corner. A downward textbook header but the Brighton man aimed it straight at Sommer who claimed the ball comfortably.
Seferovic again had time to take the ball down in the box a minute before half-time but just as he unleashed his effort he was put under real pressure from a lunging Duffy, and the ball was duly smacked high over the bar.
Ireland enjoyed a look at goal just before the break as the ball was worked through midfield, before Browne played a clever ball into the feet of Collins.
The striker swivelled and shot but the ball held up en route to goal and it was easy for Sommer as the home side saw out the first half with a one-goal advantage.
That was the last involvement for Collins who was replaced by Callum O’Dowda at half-time.
Ireland enjoyed a bright start to the second period and O’Dowda made an immediate impact winning a free on the right following a lunge by Akanji.
The ball was hoisted to the back post and eventually worked back on goal by McClean but Duffy arrived just too late to connect.
Poor Duffy defending in the 51st minute allowed Breel Embolo outmuscle him before drawing the foul.
The ball was whipped in at tremendous pace by Ricardo Rodriguez and a point-blank header by Seferovic was brilliantly helped over the bar by Randolph.
Ireland then enjoyed their best period of possession as they kept the ball in the Swiss half, attacking from both flanks; O’Dowda again making an impact as Duffy joined in on occasion.
And it was Whelan who drove the side on throughout, playing in a more advanced role as Ireland looked to get back into the game.
Chances at both ends came and went as a Xhaka free sailed over the bar, before an Egan snap-shot went just wide.
The reinvigorated Swiss almost doubled their lead in the 64th minute as Schar crashed his header from a corner onto the post – McClean doing well to prevent the rebound being helped home.
Shane Duffy picked up another yellow card for a late challenge on Akanji, which rules him out of the Denmark decider.
But worse was to follow for Ireland as the captain would also get himself ruled out as he received his marching orders with 15 minutes remaining.
Switzerland had noticeably increased the pressure on the Irish defence, who were being dragged over and back and out of position, camped on the edge of their own box.
Inevitably a chance would present itself and it fell to Embolo, in space inside the box.
The powerhouse forward showed composure on this occasion and tried to curl his shot into the far corner but it was blocked en route to goal by Coleman’s hand and the referee quickly pointed to the spot.
A second yellow for the skipper as Ireland had to finish the game with ten men.
But Randolph was to keep his side in the game with a marvellous save from Rodriguez’s penalty, as the Bray native got fingertips on it to help the ball onto the post; the Swiss could not turn the ball home in the goalmouth scramble.
By this stage, victory was beyond Ireland as the game entered the final ten minutes, but McCarthy’s side battled on looking to grab a late equaliser.
The Swiss had gained a reputation for conceding late goals but they never really looked like doing so on this occasion as the game moved into injury time.
And then there was one last twist of the knife, as the home side sealed the victory with the last kick of the game.
The home side had men over as they burst through and into the final third, the ball eventually worked into the path of the arriving Edimilson Fernandes.
The first-half substitute smashed the ball across goal before the desperate defending of Duffy could do nothing else but slam the ball into the back of the net.
In the end, there can be no complaints from the Irish side who came up against the best of what the Swiss have to offer with the real downside to their endeavours being that both Duffy and Coleman will not be eligible for the final roll of the dice against the Danes in November.
Switzerland: Yann Sommer; Nico Elvedi, Manuel Akanji, Fabian Schar; Ricardo Rodríguez, Denis Zakaria, Granit Xhaka, Stephan Lichtsteiner (capt) (Remo Freuler 70); Admir Mehmedi (Edimilson Fernandes 29), Breel Embolo (Renato Steffen 88), Haris Seferovic
Ireland: Darren Randolph; Seamus Coleman (capt), John Egan, Shane Duffy, Enda Stevens; Glenn Whelan, Alan Browne, Jeff Hendrick, James McClean; Arron Connolly (Scott Hogan 70), James Collins (Callum O’Dowda HT)
Referee: Szymon Marciniak (POL)