Swansea ensured their place in the last 32 of the UEFA Europa League, despite a 1-0 defeat away to St Gallen on Thursday.
Michael Laudrup's men went into their final Group A encounter knowing that a draw would be enough to see them progress to the knockout stages.
Even with a slip-up, only a three-goal swing and a victory for Kuban Krasnodar over Valencia would have been enough to see the Welsh club eliminated from the competition.
St Gallen - playing for nothing more than pride - struck the winner 10 minutes from time, as Marco Mathys found the net from close range.
Swansea could not respond, but the result was made immaterial by Valencia's 1-1 draw with Kuban in Spain.
Wilfried Bony returned from his hamstring injury to solve Laudrup’s striker problems, the Ivorian coming in as part of six changes made by the visitors from their 1-1 draw against Hull City, with Wayne Routledge and Alejandro Pozuelo also included.
St Gallen, meanwhile, made just one alteration from their 2-0 win over Sion, Marcel Herzog replacing Daniel Lopar in goal.
Swansea were the first to have an effort on goal after eight minutes as Roland Lamah curled wide of the post from the edge of the area.
But having survived that scare, the hosts were dealt a blow shortly afterwards when striker Goran Karanovic - who has 12 goals to his name in all competitions this season - was replaced by Alhassane Keita after suffering a hamstring injury.
Chances proved few and far between for the rest of the first half, with the two sides reduced to speculative efforts from long range.
However, Swansea perhaps should have taken the lead after 32 minutes when Lamah found space on the edge of the penalty area only to fire narrowly off target.
Bony went close immediately after the half-time interval, but they had goalkeeper Gerhard Tremmel to thank for keeping them on level terms a few moments later as he produced a fine save to deny Mathys.
And the German was forced into action shortly before the hour mark to keep out Roberto Rodriguez's effort after the winger had beaten the Swansea offside trap.
Fortune favoured Swansea for much of the second half, with only the woodwork preventing Sebastien Wuthrich's free-kick from finding the net.
Defender Chico Flores went off with an injury for Swansea shortly after that scare, and their defence looked to have finally been breached when Neil Taylor bundled the ball into his own net under pressure, however, the goal was ruled out for a push by Wuthrich.
Swansea's defensive efforts became more desperate in the closing stages, Jose Canas clearing a Mathys header off the line, but the Swiss club finally snatched a deserved victory when the same player volleyed home Wuthrich's left-wing cross.
A tense finale followed for Swansea, but as news of Kuban's draw in Valencia filtered through, their progress was confirmed.
|Coach: J. Saibene|
for G. Karanović 13'
for R. Rodriguez 59'
for M. Mathys 88'
|Champions League Final: Luis Enrique worried about Juve, Italian fan nears end of Berlin bike ride|
|Essien joins Panathinaikos|
|Blatter in profile: A look back on 17 years at the top of world football|
|Demichelis set for international retirement after Copa|
|Football world reacts to Blatter resignation|
|Blackpool turn to McDonald|
|Blatter resignation: How the FIFA scandal unfolded|
|Ancelotti rejects Milan approach|
|Platini: Blatter resignation ´the right decision´|
|Swiss Attorney General: Blatter not under investigation|
|Blatter resignation can inspire FIFA change - Scala|
|Mohsni faces lengthy SFA ban|
|Sepp Blatter: Resignation speech in full|
|Blatter to resign as FIFA president|
|Adkins named Sheffield United manager|
|Juve talks ongoing - Witsel|
|Costa has no intention of leaving Chelsea|
|Ligue 1: Paris Saint-Germain season review - Blanc´s men make history|
|Luis Enrique ´worried´ by Juve|
|Mourinho: Costa happy at Chelsea|
|Mourinho hits out at ´unacceptable´ Loftus-Cheek display|
|Inter an ´option´ for Richards|
|Messi: Off-field relationship with Neymar and Suarez key|
|Remy rifle seals Sydney win for Chelsea|
|Messi could replicate Bilbao goal - Luis Enrique|
|Liverpool mauling a boost in transfer market, says Stoke chairman Coates|
|Adkins: Football can learn a lot from rugby|
|Celtic swoop for City defender Boyata|
|Xavi out to sign off in style at Barca|
|Criscito and Poli leave Italy squad|
|Lacazette plays down ´unfounded´ PSG rumours|
|Lloris: No buy-out clause in Tottenham contract|
|Newcastle released Taylor and Gutierrez in same phone call|
|Alba signs new Barcelona deal|
|Benteke coy on Villa future|
|FIFA denies Valcke involvement in $10million payment|
|Brazil selection never influenced, says technical director|
|Pogba doing ´great things´ and will get better, says Deschamps|
|Bundesliga: Borussia Dortmund season review - Klopp endures rocky farewell|
|Adler ´aged three years´, Labbadia ´extremely proud´ of Hamburg|
|Colombia squad settles in Argentina|
|Balotelli ´a target´ because of Liverpool form - Richards|
|Bosnich: If I´d listened to Terry I would have avoided drugs|
|Luiz Gustavo ruled out of Brazil´s Copa America squad|
|Mexico confirm Copa squad|
|Pogba ´very happy´ at Juve|
|Pogba can be Europe´s greatest - Pirlo|
|Pinedo stays in Argentina, Bolivia captain Raldes in Copa America squad|
|Quinteros cuts Banguera, Hidalgo for Chile showpiece|
|Injured Gonzalez misses Copa America, Venezuela finalise youthful squad|
|Champions League Final: Buffon plays down Juve hopes, Iniesta doubtful|
|Karlsruher 1 Hamburg 2 (2-3 agg): Muller strike ensures survival|
|CONCACAF official Sanz banned by FIFA|
|Gourvennec shuns admirers with Guingamp extension|
|Pastore signs PSG extension|
|Morel swaps Marseille for Lyon|
|Watford sign Austria defender Prodl|
|Monaco confirm Berbatov departure|
|Peru v Mexico: Herrera confident as Copa preparations continue|
|Injury rules Dost out of Netherlands friendlies|
|Koeman must strengthen attack for Europa League challenge - McMenemy|
|Wilshere apologises for Spurs taunts|
|Marchisio: No fear ahead of Barcelona clash|
|Klopp to take break after leaving Dortmund|
|Champions League win would be ´more than extraordinary´ - Allegri|
|Charity calls for education after Leicester ´racist orgy´ claims|
|Taylor agrees Swansea deal|
|Sevilla snare Krohn-Dehli|
|Coloccini hails Gutierrez after ´perfect´ Newcastle finale|
|Benitez excited by Madrid opportunity|
|Sampaoli confirms final Chile squad for Copa America|
|Clement ready to go it alone at Derby|
|Mihajlovic confirms Sampdoria exit|
|Brentford turn to Dijkhuizen|
|Usami, Moto to lead Japan qualifying threat|
|Vieira ´the best bet´ for Newcastle - Bernard|
|´We´ll see what happens with my future´ - De Gea|
|Klinsmann: Guzan will start at Gold Cup|
|Alves wants Barca extension not PSG - Blanc|
|Derby appoint Paul Clement as head coach|
|Karlsruher ´can only win´ - Kauczinski|
|Ronaldinho causes stir with disallowed goal|
|Szczesny plans Arsenal stay|
|Pioli: Lazio deserve Champions League qualification|
|Pablo Aimar makes River Plate return|
|MLS Review: Seattle leave it late against Red Bulls|
|Wenger: Arsenal won´t spend big|
|Police to investigate Rangers-Motherwell fight|
|´I will definitely stay´ at City - Toure|
|Champagne backs Blatter to reform FIFA|
|Honduras 2 El Salvador 0: Penalty, goal and red card to Lozano|
|Mancini wants Icardi to stay|
|Sampdoria set to speak on Mihajlovic future|