Sweden needed a late winner from substitute Hanna Bennison to close in on a place in the Euro 2022 quarter-finals with a 2-1 win over Switzerland in Sheffield on Wednesday.
Ranked second in the world, Sweden were among the pre-tournament favourites but have so far struggled to hit top gear in England so far.
After a 1-1 draw to open their campaign against defending champions the Netherlands, the Olympic silver medallists were expected to roll over a Swiss side ranked 20th in the world.
Switzerland's preparations had also been rocked by a sickness bug in the camp that forced them to cancel training on Monday.
But they frustrated the Swedes for 53 minutes at Bramall Lane before Barcelona's Fridolina Rolfo finished off an excellent team move.
Switzerland hit back within two minutes through a fine finish by Paris Saint-Germain's Ramona Bachmann.
Peter Gerhardsson was forced to turn to his bench for inspiration and it was one of his subs, Bennison, who scored the winner, with her first international goal 11 minutes from time.
Victory takes Sweden top of Group C, three points clear of the Netherlands and Portugal, who face each other later on Wednesday.
Switzerland now need to beat the Dutch in their final group game to have any hope of reaching the last eight.