In what could be known as one of the biggest upsets of the World Cup, host nation Russia caused one of the biggest upsets by knocking out 2010 World Cup champions Spain from this year's tournament.
The hosts, surviving two hours of dominance by El Rojo in a 1-1 draw and then winning a penalty shootout 4-3 on Sunday.
Russia's captain and goalkeeper Igor Akinfeev saved spot-kicks from Jorge "Koke" Resurreccion and Iago Aspas, while all four Russian shooters scored before thousands of screaming home fans.
Akinfeev used his trailing left foot to kick the ball high away from the goal on Spain's last attempt. The 32-year-old goalkeeper leapt up, punched the air with both hands and dove into a belly flop cross the rain-soaked turf as teammates raced to him from the halfway line.
The World Cup's lowest-ranked team — 70th when the tournament began — now advances to a quarterfinal against Croatia or Denmark in Sochi on Saturday.
A Russian-hosted party many feared would see the home team's hopes end within days now extends into a fourth weekend at the tournament.
"I just feel emptied out," Akinfeev said. "Over the whole second half and extra time we were defending our goal and managed it, we were hoping for penalties because Spain are hard to beat. Spain can't always be lucky."
It gave Russia its greatest win in international soccer for 10 years, since Akinfeev was in goal for an extra-time victory over the Netherlands in a European Championship quarterfinal. That run was ended days later by a Spain team beginning its era of dominance.
Spain has now failed to win a knockout game at three major tournaments since it won the 2012 European championship, its third straight major title after the Euro 2008 and the 2010 World Cup.
It was too passive a performance by the Spanish, who were ranked 10th and one of the pre-tournament favorites. Turmoil erupted two days before the opening game, when the federation fired the head coach.
"It's painful, there's nothing else we can say," Spain captain Sergio Ramos said. "We left our soul in the pitch."
It is unclear if interim coach Fernando Hierro will continue in the post he did not seek before Julen Lopetegui was sent home. Lopetegui was fired because he had failed to tell the national soccer federation he accepted an offer to coach Real Madrid after the tournament.
Sunday's defeat likely spells the end of Andres Iniesta's national-team career. The 34-year-old Barcelona midfielder came off the bench and almost won the game with an 85th-minute shot well saved by Akinfeev. Iniesta also scored the first spot-kick of the shootout.
Spain was more urgent in extra time after being too passive when it dominated the ball in the 90 minutes of regular time.
Akinfeev pushed away a 109th-minute shot from substitute Rodrigo who ran hard at goal from near the halfway line. He also ensured the game needed 30 extra minutes with back-to-back diving saves in the 85th to deny substitutes Iniesta and Aspas.
Spain dominated the ball during the game — completing more than 1,000 passes — but rarely threatened a well-organized Russian defense.
Spain led in the 12th minute when Ramos helped force Russia's Sergei Ignashevich into an own goal when his back was turned to the play. The 38-year-old defender diverted a crossed ball into the net with his heel as he and Ramos got tangled up.
An error in Spain's defense let Russia level in the 41st, after Gerard Pique's raised arm blocked a header by Artyom Dzyuba at a corner. Pique's complaints were wasted. Referees and video officials have consistently penalized handballs in the box at this World Cup.
Dzyuba's penalty kick fooled goalkeeper David De Gea to dive the wrong way.
The noisy 78,000-capacity Luzhniki Stadium has been good for Russia at this tournament, which kicked off here with a 5-0 win over Saudi Arabia. That defied expectations for the home team, and Russia's path to the final also includes a potential semifinal here.
SPECIAL GUESTS
King Felipe VI of Spain was at the Luzhniki Stadium in Moscow. The king is a soccer fan who, as crown prince, attended the 2010 World Cup final in Johannesburg to see Spain beat the Netherlands 1-0 in extra time.
Russia was represented by Prime Minister Dmitry Medvedev, who was on his feet and leaning on a protective barrier to watch the shootout.
FOURTH SUBSTITUTE
World Cup history was made with the first use of a fourth substitute, which FIFA now allows teams to have one more sub in extra time. Russia's Alexander Yerokhin went on in the 97th minute against Spain, replacing fellow midfielder Daler Kuzyaev. The rule is aimed at reducing injuries and allowing higher-quality play in extra time, when players are most tired.