(CNN)Spain needed a nerve-shredding penalty shootout to beat Switzerland and reach the semifinals of Euro 2020 on Friday.
Mikel Oyarzabal scored the decisive penalty after a shootout of low quality -- Switzerland missed four of its five attempts.
For much of the match, Spain looked to be breezing into the last four of the competition without any trouble. It took an early lead after Denis Zakaria's unfortunate own goal, but struggled to cope with a late Switzerland flurry.
Just as the game began petering out in the second half, Swiss talisman Xherdan Shaqiri fired back with an equalizer in the 68th minute after an error in the Spain defense.
Momentum then swung in Switzerland's favor, but the joy was short lived. Remo Freuler was shown a questionable red card in the 77th minute, leaving 10-man Switzerland to hold out for penalties through extra-time -- with the match finishing 1-1.
Another own goal
Both sides came into the tie off the back of dramatic, and exhausting, round of 16 matches.
Spain edged past Croatia in extra-time on Monday, winning 5-3 in an epic tie, whilst Switzerland stunned reigning world champion France with victory on penalties.
Switzerland's heroics looked to have taken too much out of the team as it struggled to impose itself in a relatively subdued first half in Saint Petersburg, Russia.
Without usual captain Granit Xhaka, who was banned after picking up a yellow card against France, the team looked content on sitting back and soaking up waves of Spanish attack.
Unsurprisingly, it was Spain which made the breakthrough after 8 minutes, albeit through fortunate circumstances.
Jordi Alba's strike from outside the box took a wicked deflection off Zakaria and the ball flew past goalkeeper Yann Sommer, who was stranded diving the wrong way.
Incredibly, it was the 10th own goal scored at the tournament, one more than at each of the previous 15 European Championships combined.
Things got worse for Switzerland as its main attacking threat Breel Embolo was forced off the pitch with a hamstring injury with a little over 20 minutes played.
Chances were few and far between in the match with Spain totally dominating proceedings after halftime.
But, just when a Spain win seemed inevitable, Switzerland's Shaqiri capitalized on a defensive mix-up to sweep home an equalizer in the 68th minute.
Despite little danger, Aymeric Laporte accidentally hit the ball against teammate Pau Torres, leaving Remo Freuler to tee up Shaqiri for the goal.
But the joy was short lived with Freuler sent off for what referee Michael Oliver deemed a reckless tackle in the 77th minute.
On second viewing, and despite VAR agreeing with Oliver, the decision seemed harsh with Freuler seemingly making contact with the ball in a sliding tackle on Gerard Moreno.
With the scores level, the tie went into extra-time with 10-man Switzerland holding out for penalties.
Despite being so impressive with its spot kicks against France, Switzerland only managed to score one of its penalties against Spain, which itself missed two attempts.
Despite the win, questions still remain over Spain's shaky defense and lack of cutting edge. It will certainly face a tougher test in the next round as it takes on either Italy or Belgium on Tuesday.