Swansea reached the knockout stages of the Europa League despite a disappointing 1-0 defeat in the fog and cold of St Gallen.
The Welsh club knew a draw would be enough to guarantee their progression from Group A, but Kuban Krasnodar's failure to beat Valencia in Spain ensured this defeat did not prove costly.
In sub-zero temperatures and with a low fog hindering visibility, the visitors had the better of the opening half with Roland Lamah twice going close.
But they slackened off after the break and were punished when Marco Mathys found the net from close range with 10 minutes to go.
Swansea's preparations for this fixture had been far from ideal after fog and technical issues ensured their journey to Switzerland on Wednesday took over 12 hours.
Some players were also awoken by a shallow earth tremor in the early hours of the morning.
But they managed to take an early control of the match, with Lamah curling just wide and later firing narrowly off-target with a low shot.
However, their hosts were much improved after the break and Roberto Rodriguez was twice denied by Gerhard Tremmel after some poor Swansea defending.
The hosts had a goal chalked off for a push on Neil Taylor but found the winner their efforts deserved when Mathys prodded in a low cross from Sebastien Wuthrich.
Swansea still reached the latter stages of a European tournament for the first time in their history, and they will be in Monday's draw for the last 32 along with the likes of Benfica, Ajax, Napoli and Juventus.
The cold and the fog made for testing conditions and contributed to an instantly forgettable opening 45 minutes with few chances and fewer moments of real quality.
Swansea did at least have the better of proceedings and they could have led early on when Lamah seized on a loose ball and curled a left-footed strike just wide of the far post.
Jonjo Shelvey, one of few players who stood out during the drab first period, then worked St Gallen keeper Marcel Herzog with a low shot as Swansea had plenty of joy with rapid counter-attacks.
As the fog started to descend, Wayne Routledge burst into the box but a heavy touch let the ball run away from him and the chance was gone.
But it was not entirely comfortable for Swansea, as sloppy passing and poor positioning offered up some promising positions.
Full-back Dwight Tiendalli's decision to allow Ermir Lenjani the freedom of the left-hand side of the field was particularly poor, and roused manager Michael Laudrup from the bench after the midfielder had flashed a shot just wide.
At the other end Lamah once again went close having been teed up by a Routledge flick, but he put his low effort inches wide with Herzog beaten.
Wilfried Bony, returning from a hamstring injury, powerfully headed narrowly wide from a Jonathan de Guzman corner, but Swansea then survived two big scares.
Mathys' pass put Rodriguez in on goal but Tremmel saved his low effort, and followed that with another good stop from the same player after Tiendalli had played three St Gallen players onside.
Swansea then lost Chico Flores with what appeared to be an ankle problem, and their discomfort continued when Wuthrich struck the post with a free-kick.
Swansea looked to have fallen behind when the ball hit Neil Taylor and rolled in, but the goal was ruled out for a push on the defender by Wuthrich.
Jose Canas, on for Flores, then cleared a Mathys header off the line as the pressure increased.
The pressure finally told when Mathys netted, but it was not enough to prevent Swansea's progression.