Spain is moving on to the semifinals of Euro 2020.
Mikal Oyarzabel scored the decisive penalty after extra time to advance Spain through the tournament after the teams tied 1-1 in regulation and extra time.
Both teams missed penalty kicks in the shootout, a shootout that didn't resemble Switzerland's shootout win over France a few days earlier. Spain had a penalty saved and another go off the post while Switzerland had three missed penalties. The Swiss made all five of their penalties against France on Monday.
The shootout loss overshadows a fantastic defensive performance from Switzerland in the game's final third.
Switzerland went down to 10 men in the 77th minute when Remo Freuler got a red card for a tackle. Switzerland immediately played defensively for the rest of regulation and the 30 minutes of added time after that.
The final 45 minutes or so was a Spain repeat of what happened against Sweden and Poland in the first two games of the tournament. Spain dominated possession and created opportunities to score but never capitalized on anything. It was an exercise in frustration for Spain fans. And that's probably putting it mildly as goalie Yann Sommer had yet another fantastic game.
Spain took a 1-0 lead early in the game after a Jordi Alba shot was deflected into the back of the net by Denis Zakaria. He was starting for Switzerland because Granit Xhaka was suspended for the game due to an accumulation of yellow cards.
Switzerland tied it in the 68th minute when Xerdan Shaqiri scored the equalizer. At that point, it felt like another Switzerland comeback was possible and the magic would continue. But Freuler's red card less than 10 minutes later forced Switzerland into a defensive crouch that worked well enough to get the game to penalty kicks.
Spain will play Italy in a semifinal Tuesday.
More from Yahoo Sports: