Spain reached the quarter-finals of the Women's World Cup for the first time after producing an outstanding display of firepower in Auckland to send Switzerland out.
La Roja were beaten 4-0 in their final group game by Japan five days earlier in Wellington but bounced back in style to score four times during a dominant first half showing in front of 43,217 - a record crowd for a football match in New Zealand.
Aitana Bonmati swept the Spanish ahead before Switzerland equalised when Laia Codina, without looking up, hit a back pass past her own keeper and into the net from 10 yards inside her own half.
Spain soon restored their lead through Alba Redondo's header before Barcelona midfielder Bonmati produced a classy finish to make it 3-1.
In an incredible opening half, Codina made up for her own goal by adding Spain's fourth after a scramble inside the box.
They added another after half-time through Jennifer Hermoso's clinical finish - her third goal of this tournament.
Jorge Vilda's side are the first to reach the last eight and will play the winners of Sunday's match between the Netherlands and South Africa in the quarter-finals in Wellington next Friday (02:00 BST).
Spain hit back after Japan defeat
Spain produced the perfect response after being written off following the 4-0 hammering against Japan.
Boss Vilda promised a response from his players after that comprehensive defeat and he got one as the side ranked sixth in the world got the job done before half-time in Auckland.
Vilda responded to the Japan defeat by making five changes, giving a debut to goalkeeper Cata Coll in place of first-choice Misa Rodriguez, who had started the previous three games in New Zealand.
Coll will not have appreciated the wild back pass by her Barcelona team-mate Codina.
That aside, this was a highly impressive performance for a team that came into this World Cup with a cloud of doubt hanging over the squad after a feud between Vilda and many senior players.
Those differences have been put aside for now and Spain look like a team playing in harmony. This was their third win in four games in New Zealand.
Spain enjoyed 70% possession against Switzerland, the highest possession rate of any team in a knockout game at the last four editions of the Women's World CupOne step too far for Switzerland
This was one game too many for Group A winners Switzerland, who had qualified for the knockout stage despite winning one game out of the three and scoring two goals in 270 minutes.
Ten of the starting XI at Eden Park were starting their fourth game after three successive clean sheets yet they were overwhelmed by their opponents.
Swiss boss Inka Grings had said that finding goals was a priority in training yet they struggled to trouble Spain's defence and registered just one attempt on target.
They head home from their second Fifa Women's World Cup having topped a group containing Norway, co-hosts New Zealand and the Philippines.
Having required a 121st minute winner in a play-off against Wales in Zurich to qualify, their World Cup ended in disappointing fashion, with their players looking crestfallen as they walked around the pitch applauding fans after full time.
This was Switzerland's heaviest ever defeat at the Fifa Women's World Cup and saw them concede as many goals as they had across all their seven previous games at the tournamentPlayer of the match
ParallueloSalma Paralluelo
Switzerland
Squad number13Player nameWälti
Squad number5Player nameMaritz
Squad number19Player nameAigbogun
Squad number9Player nameCrnogorcevic
Squad number17Player namePiubel
Squad number1Player nameThalmann
Squad number22Player nameTerchoun
Squad number2Player nameStierli
Squad number11Player nameSow
Squad number20Player nameHumm
Squad number8Player nameRiesen
Squad number18Player nameCalligaris
Squad number10Player nameBachmann
Squad number6Player nameReuteler
Squad number3Player nameMarti
Squad number16Player nameMauron
Spain
Squad number18Player nameParalluelo
Squad number11Player namePutellas
Squad number6Player nameBonmatí
Squad number2Player nameBatlle
Squad number23Player nameCata Coll
Squad number10Player nameHermoso
Squad number22Player namedel Castillo
Squad number9Player nameGonzález
Squad number15Player nameNavarro
Squad number12Player nameHernández
Squad number16Player namePérez
Squad number14Player nameCodina
Squad number3Player nameAbelleira
Squad number7Player nameGuerrero
Squad number4Player nameParedes
Squad number17Player nameRedondo
Line-ups
Switzerland
Formation 4-3-3
1Thalmann
19Aigbogun5Maritz2Stierli8Riesen
11Sow13Wälti6Reuteler
17Piubel10Bachmann9Crnogorcevic
1Thalmann19AigbogunSubstituted forCalligarisat 45'minutes5Maritz2StierliBooked at 73mins8RiesenSubstituted forMartiat 84'minutes11SowSubstituted forTerchounat 45'minutes13Wälti6ReutelerSubstituted forMauronat 45'minutes17PiubelSubstituted forHummat 75'minutes10Bachmann9CrnogorcevicSubstitutes
3Marti4Felber7Arfaoui12Peng14Rey15Bühler16Mauron18Calligaris20Humm21Friedli22Terchoun23LehmannSpain
Formation 4-3-3
23Coll Lluch
12Hernández4Paredes14Codina2Batlle
6Bonmatí3Abelleira10Hermoso
17Redondo9González18Paralluelo
23Coll Lluch12Hernández4Paredes14Codina2Batlle6BonmatíSubstituted forGuerreroat 77'minutes3AbelleiraSubstituted forPérezat 64'minutes10HermosoSubstituted forPutellasat 77'minutes17Redondo9GonzálezSubstituted forNavarroat 64'minutes18ParallueloSubstituted fordel Castilloat 84'minutesSubstitutes
1Rodríguez Rivero5Andrés7Guerrero8Caldentey Oliver11Putellas13Salón15Navarro16Pérez19Carmona20Gálvez21Zornoza22del CastilloReferee:Cheryl FosterAttendance:43,217Live Text
Match ends, Switzerland 1, Spain 5.
Second Half ends, Switzerland 1, Spain 5.
Foul by Eva Navarro (Spain).
Viola Calligaris (Switzerland) wins a free kick in the defensive half.
Attempt missed. Fabienne Humm (Switzerland) right footed shot from outside the box misses to the right. Assisted by Sandrine Mauron.
Foul by Irene Guerrero (Spain).
Lia Wälti (Switzerland) wins a free kick on the left wing.
Foul by Ona Batlle (Spain).
Noëlle Maritz (Switzerland) wins a free kick on the right wing.
Foul by Alexia Putellas (Spain).
Lia Wälti (Switzerland) wins a free kick in the defensive half.
Foul by Laia Codina (Spain).
Ramona Bachmann (Switzerland) wins a free kick in the defensive half.
Substitution, Switzerland. Lara Marti replaces Nadine Riesen.
Substitution, Spain. Athenea del Castillo replaces Salma Paralluelo.
Attempt missed. Ona Batlle (Spain) right footed shot from the left side of the box is too high. Assisted by Alexia Putellas.
Corner, Spain. Conceded by Gaëlle Thalmann.
Attempt saved. Eva Navarro (Spain) left footed shot from outside the box is saved in the top centre of the goal.
Corner, Spain. Conceded by Viola Calligaris.
Eva Navarro (Spain) wins a free kick in the defensive half.