Switzerland revived their hopes of qualifying directly for Euro 2020 with a nervous 2-0 win in rain-soaked Geneva on Tuesday which threw their group wide open.
In the process they denied their opponents Ireland the chance to book their place early.
Ireland would have qualified with a win but that never looked likely from the moment that Haris Seferovic gave Switzerland a 16th-minute lead.
Ireland had a let-off when Ricardo Rodriguez saw a second-half penalty saved before an own goal by Shane Duffy in stoppage time ensured three points for the hosts.
Ireland and Denmark top Group D on 12 points apiece with the Swiss one behind.
However, Ireland have only one match left, at home to Denmark, while the Danes and Swiss still have two each to play.
Switzerland have a much easier run-in as they host Georgia and visit Gibraltar in their final games.
Switzerland took early control and Seferovic picked up a loose ball outside the penalty area and scored with a snapshot beyond Darren Randolph to put them ahead.
Ireland had to wait 42 minutes for their first effort on target, a Duffy header from a corner which went straight to keeper Yann Sommer.
Seferovic fired wildly over from a good position before halftime and, as the hosts became edgy, Ireland enjoyed a long period of pressure early in the second half.
After Randolph turned a Fabian Schaer header onto the post, Switzerland won a penalty when Seamus Coleman blocked Breel Embolo’s shot with his hand and was sent off for a second bookable offence.
Yet Rodriguez’s weak penalty from a stuttering run up was pushed onto the post by Randolph.
Switzerland finally settled matters with the last kick of the game courtesy of Duffy, who slid Edimilson Fernandes’ shot into his own net.
Georgia, who cannot qualify from the group, won 3-2 away to Gibraltar in the other game.
Giorgi Kharaishvili and Jaba Kankava put Georgia 2-0 ahead after 21 minutes.
But Gibraltar, still without a point, hit back to equalise through Lee Casciaro and Roy Chipolina in an eight-minute spell in the second half.
It was all in vain, however, as Giorgi Kvilitaia grabbed Georgia’s winner six minutes from fulltime.