Tournament co-hosts New Zealand were knocked out of the Fifa Women's World Cup as Switzerland got the draw they needed to advance as Group A winners.
Jacqueline Hand hit the post for New Zealand but they could not get the win they needed to stay in the competition.
They become the first host nation to fail to make it past the group phase.
It was a tame and disappointing end to the tournament for New Zealand, who had beaten Norway 1-0 in the World Cup's opening match.
A shock 1-0 loss on Tuesday in Wellington against the Philippines, the lowest ranked nation in Group A, left New Zealand's qualification in the balance, although their fate was still in their hands before their final match in Dunedin.
But, in a game they needed to win, they failed to have a single shot on target in the opening 70 minutes against Switzerland.
With the Europeans themselves only one goal away from elimination, it became tight and tense with neither side able to create many clear-cut opportunities.
Tearful and disappointing end to New Zealand's campaign
A number of New Zealand players were in tears at the final whistle, with their team eliminated on goal difference.
This was the country's sixth appearance at a Women's World Cup, but they had not won any of their previous 15 matches before Hannah Wilkinson scored the only goal in their 2023 opener as they beat Norway in front of a crowd of 42,137.
But the loss to the Philippines, a side ranked 20 places below them, was the one that proved crucial.
New Zealand, 26th in the world, did not give their supporters much to cheer about against Switzerland as they had to wait until the 74th minute to see the hosts have their first shot on target - a weak effort from Malia Steinmetz straight at Swiss goalkeeper Gaelle Thalmann.
The Football Ferns then had a tame header on target from Claudia Bunge, before eight minutes of injury time.
New Zealand goalkeeper Victoria Esson went up for a corner and two free-kicks, getting her head on one of the free-kicks, only to send her effort well off target.
But the hosts could not get a goal as Switzerland hung on to move into the last 16 for the second time, after also doing so in their previous appearance in 2015.
They will play the runners-up in Group C, the losers of Monday's Spain v Japan game, in the first of the knockout matches on Saturday, 5 August.
Player of the match
LehmannAlisha Lehmann
Switzerland
Squad number23Player nameLehmann
Squad number1Player nameThalmann
Squad number13Player nameWälti
Squad number5Player nameMaritz
Squad number16Player nameMauron
Squad number19Player nameAigbogun
Squad number11Player nameSow
Squad number18Player nameCalligaris
Squad number8Player nameRiesen
Squad number10Player nameBachmann
Squad number6Player nameReuteler
Squad number17Player namePiubel
Squad number2Player nameStierli
Squad number9Player nameCrnogorcevic
Squad number22Player nameTerchoun
New Zealand
Squad number16Player nameHand
Squad number14Player nameBowen
Squad number13Player nameStott
Squad number21Player nameEsson
Squad number4Player nameBott
Squad number6Player nameSteinmetz
Squad number7Player nameRiley
Squad number10Player nameLongo
Squad number12Player nameHassett
Squad number17Player nameWilkinson
Squad number11Player nameChance
Squad number9Player nameRennie
Squad number3Player nameBunge
Squad number20Player nameRiley
Squad number2Player namePercival
Squad number18Player nameJale
Line-ups
Switzerland
Formation 4-3-2-1
1Thalmann
19Aigbogun5Maritz2Stierli8Riesen
11Sow13Wälti6Reuteler
17Piubel10Bachmann
9Crnogorcevic
1Thalmann19Aigbogun5Maritz2Stierli8Riesen11Sow13Wälti6ReutelerSubstituted forLehmannat 71'minutes17PiubelSubstituted forCalligarisat 85'minutes10BachmannSubstituted forMauronat 85'minutes9CrnogorcevicSubstituted forTerchounat 90+4'minutesSubstitutes
3Marti4Felber7Arfaoui12Peng14Rey16Mauron18Calligaris20Humm21Friedli22Terchoun23LehmannNew Zealand
Formation 4-4-2
21Esson
4Bott13Stott14Bowen7Riley
10Longo6Steinmetz2Percival11Chance
16Hand17Wilkinson
21Esson4Bott13StottSubstituted forBungeat 62'minutes14Bowen7Riley10LongoSubstituted forHassettat 62'minutes6Steinmetz2PercivalSubstituted forJaleat 72'minutes11ChanceSubstituted forRileyat 45'minutes16Hand17WilkinsonSubstituted forRennieat 82'minutesSubstitutes
1Nayler3Bunge5Foster8Cleverley9Rennie12Hassett15Satchell18Jale19Anton20Riley22Clegg23LeatReferee:Tori PensoAttendance:25,947Live Text
Match ends, Switzerland 0, New Zealand 0.
Second Half ends, Switzerland 0, New Zealand 0.
Attempt blocked. Malia Steinmetz (New Zealand) right footed shot from outside the box is blocked.
Foul by Coumba Sow (Switzerland).
Betsy Hassett (New Zealand) wins a free kick on the left wing.
Attempt missed. Victoria Esson (New Zealand) header from the centre of the box misses to the right. Assisted by Katie Bowen with a cross following a set piece situation.
Foul by Meriame Terchoun (Switzerland).
Catherine Bott (New Zealand) wins a free kick on the right wing.
Foul by Alisha Lehmann (Switzerland).
Katie Bowen (New Zealand) wins a free kick in the defensive half.
Substitution, Switzerland. Meriame Terchoun replaces Ana-Maria Crnogorcevic.
Corner, New Zealand. Conceded by Ana-Maria Crnogorcevic.
Sandrine Mauron (Switzerland) wins a free kick on the left wing.
Foul by Gabi Rennie (New Zealand).
Attempt saved. Coumba Sow (Switzerland) right footed shot from the right side of the box is saved in the top centre of the goal. Assisted by Ana-Maria Crnogorcevic.
Attempt saved. Jacqui Hand (New Zealand) right footed shot from the left side of the box is saved in the top right corner. Assisted by Grace Jale.
Substitution, Switzerland. Sandrine Mauron replaces Ramona Bachmann.
Substitution, Switzerland. Viola Calligaris replaces Seraina Piubel.
Foul by Coumba Sow (Switzerland).
Claudia Bunge (New Zealand) wins a free kick in the defensive half.