Host Russia beat Spain 4-3 on penalties on Sunday to advance to the World Cup quarterfinals where it will face either Denmark or Croatia.
Russia keeper Igor Akinfeev saved Koke's and Iago Aspas' spot-kicks in their first ever penalty shootout to send the hosts through following a 1-1 draw over 120 minutes.
Spain, who have never beaten a host at World Cups or Euros, went ahead after 12 minutes when 38-year-old Sergei Ignashevich bundled into Spain captain Sergio Ramos at the far post, knocking a free kick in with his heel for the 10th own goal of the tournament.
The 2010 world champions controlled the game with their slick passing but did little more, failing to create another scoring chance in the first half.
Russia looked equally toothless up front, with Aleksandr Golovin's curled effort their only noteworthy opportunity until Gerard Pique's handball gave them a chance to level with a penalty in the 42nd minute.
Forward Artem Dzyuba buried it for his third goal of the tournament, sending Spain keeper David de Gea the wrong way to equalize and awaken the subdued 78,000 crowd in Moscow's Luzhniki Stadium.
The game lacked pace and tempo even after the break with both teams cautious not concede too much space and the Russians playing without an out-and-out striker after the substitution of Dzyuba.
Despite 75 percent possession, Spain's famed tiki-taka passing game rarely carried them into the box and they had to wait until the 85th minute to test Akinfeev with a low drive from substitute Andres Iniesta.
Having long run out of steam and with several players cramping, Russia were reduced to desperately defending in extra time as Spain, who played more than four times the number of passes their opponents did, still struggled to slice open the Russian defense.
Akinfeev came to the rescue again to deny Rodrigo after his fine sprint in the second half of extra time before becoming a national hero by saving the two spot kicks to send the hosts past the former world champions.