Match ends, Spain 1(3), Russia 1(4).
Hosts Russia pulled off the biggest shock of the 2018 World Cup so far as they beat 2010 winners Spain in the first penalty shootout of the tournament to reach the quarter-finals for the first time in 48 years.
After extra-time ended with the score locked at 1-1, goalkeeper Igor Akinfeev was Russia's penalty hero, denying Koke and then Iago Aspas to spark scenes of delirious celebration at Moscow's Luzhniki Stadium.
His opposite number, David de Gea, got a hand to the first spot-kick he faced - from Fedor Smolov - but that was the closest he came to making a save as the Russians converted their remaining penalties in clinical fashion.
Stanislav Cherchesov's side, at 70 the lowest ranked team in the competition and 60 places below Spain, now face Croatia in the last eight in Sochi on Saturday.
- In the stadium, in the bars, in the streets: Russia united in joy and disbelief
- Did Putin phone call inspire Russia to beat Spain?
- As Akinfeev stars for Russia, relive story of nation's greatest goalkeeper
Their unlikely progress is a reward for their resolute defending for most of the 120 minutes of play and should reflect the part played by their thousands of fans who roared them on throughout their defensive masterclass.
Admittedly there were few signs of the Spanish struggles to come when Sergei Ignashevich inadvertently gave Fernando Hierro's side a a 12th-minute lead.
The veteran Russian defender, who turns 39 later this month, put through his own net as he tried to stop Sergio Ramos reaching Marco Asensio's free-kick at the far post.
But Spain failed to turn their overwhelming dominance of possession into further chances and paid the price before half-time, when Artem Dzyuba's header from a corner hit Gerard Pique's outstretched arm.
Dzyuba stepped up himself to send De Gea the wrong way from the spot and the stadium went wild, not for the last time on a tumultuous evening.
The pattern of play did not change after the break, with Spain trying to pass their way through the ranks of Russia's packed defence, but lacking the imagination to fashion a serious shooting chance.
Only Andres Iniesta threatened to break the deadlock for Spain when he was belatedly summoned from the bench and the volume inside the Luzhniki increased as the Russian fans sensed their side could cling on.
When Spain did manage a sight of goal, at the start of the second period of extra-time, Akinfeev denied Rodrigo to ensure the game would go to penalties, where he would have the final say.
'From no-hopers to within two wins of the final'
Russia were seen as no-hopers by most observers when this tournament began, when even getting out of their group for the first time since the end of the Soviet era had been seen as beyond them.
Many of their supporters outside the stadium were still writing them off before this game started, but instead they saw the hosts become the first Russian side to reach the quarter-finals of a World Cup since Mexico 1970.
That was the era of the legendary Lev Yashin, so it was fitting that another goalkeeper, Akinfeev, should play the biggest part here in this memorable triumph.
Russia's captain is 32 and was winning his 111th cap but this was his greatest performance of all, and on the biggest stage.
His side's determined defending meant he was tested by few of Spain's 24 shots but he showed brilliant reactions to keep out Jordi Alba's effort, got down smartly to save Iniesta's first-time shot and then blocked Rodrigo when he danced through.
In the shootout too, he produced saves when it mattered - first by plunging to his right to push away Koke's tame effort, then sealing victory with his trailing leg when Aspas fired his penalty straight down the middle.
What now for Spain after a turbulent campaign?
While Russia march on, Spain's turbulent campaign ends in tears.
A World Cup that had begun with La Roja sacking their manager Julen Lopetegui two days before the start of the tournament, finished with a disjointed display that meant defeat was no more than the 2010 winners deserved.
While Fernando Hierro's side broke World Cup records for the most completed passes - 1,006 - since records began, they seldom looked like turning that dominance into chances, let alone goals.
After Ignashevich put through his own net, Spain did not muster their own effort at goal until the stroke of half-time and, as BBC pundit Rio Ferdinand put it, they played sideways far too often.
Even the introduction from the bench of veteran midfield maestro Iniesta, integral to so many of their triumphs of the past decade, could not inspire a late winner.
Spain simply ran out of ideas, joining Germany and Argentina as other giants to make ignominious early exits, and leaving England, Colombia, Sweden and Switzerland as other potential benefactors in what appears a wide open half of the draw.
- World Cup Daily podcast: Rejuvenated Russia, sub-par Spain & Southgate's waistcoats
- How you rated the players in Moscow
Man of the match - Igor Akinfeev (Russia)
'I accept responsibility' - what they said
Spain boss Fernando Hierro: "This is sad, it is the way it is. I'm not holding anything against anybody.
"Nevertheless I do accept responsibility and I don't avoid blame. We all tried to give it our best but that's football.
"I don't think you can talk about the team breaking down or collapsing. There's a fine line between winning and losing."
Russia goalkeeper Igor Akinfeev: "We were hoping for penalties. We are having a fantastic World Cup. Not just our fans, but the fans of other countries are getting a sense of this atmosphere and understood that Russians really know how to play football and want to play football."
'1,006 passes but only one goal - and defeat' - the stats
- Spain completed 1,006 passes in this match, only 21 fewer than Russia have completed in their four World Cup matches (1027).
- Russia have reached the quarter-final of the World Cup for the first time since the breakup of the Soviet Union.
- Spain have lost three of their four World Cup penalty shootouts (1986 v Belgium, 2002 v South Korea and in this match).
- Artem Dzyuba has scored with all three of his shots on target at the 2018 World Cup.
- Russia's veteran defender Sergei Ignashevich became the oldest player to score an own goal at the World Cup, aged 38 years and 352 days.
- Including the penalty shootout in this match, Spain goalkeeper David De Gea made just one save in his four matches at the 2018 World Cup.
- Although Spain led for 29 minutes and 52 seconds in the first half (between the 12th and 41st minutes), they did not attempt their first shot at goal until the 45th minute.
- Sergio Ramos made his 17th appearance for Spain at the World Cup in this game, a record for an outfield Spanish player and equalling the overall record held by goalkeeper Iker Casillas.
- 1De Gea
- 4NachoSubstituted forCarvajalat 70'minutes
- 3PiquéBooked at 40mins
- 20AsensioSubstituted forRodrigoat 104'minutes
- 21SilvaSubstituted forIniestaat 67'minutes
- 19Diego CostaSubstituted forIago Aspasat 80'minutes
- 10Thiago Alcántara
- 17Iago Aspas
- 3KutepovBooked at 54mins
- 2Figueira Fernandes
- 7KuzyaevSubstituted forErokhinat 97'minutes
- 11ZobninBooked at 71mins
- 18ZhirkovSubstituted forGranatat 45'minutes
- 19SamedovSubstituted forCheryshevat 61'minutes
- 22DzyubaSubstituted forSmolovat 65'minutes
- 15Al Miranchuk
- 16An Miranchuk
- Björn Kuipers
- Shots on Target
Penalty Shootout ends, Spain 1(3), Russia 1(4).
Penalty saved! Iago Aspas (Spain) fails to capitalise on this great opportunity, left footed shot saved in the centre of the goal.
Goal! Spain 1(3), Russia 1(4). Denis Cheryshev (Russia) converts the penalty with a left footed shot to the centre of the goal.
Goal! Spain 1(3), Russia 1(3). Sergio Ramos (Spain) converts the penalty with a right footed shot to the bottom left corner.
Goal! Spain 1(2), Russia 1(3). Aleksandr Golovin (Russia) converts the penalty with a right footed shot to the centre of the goal.
Penalty saved! Koke (Spain) fails to capitalise on this great opportunity, right footed shot saved in the bottom left corner.
Goal! Spain 1(2), Russia 1(2). Sergei Ignashevich (Russia) converts the penalty with a right footed shot to the bottom right corner.
Goal! Spain 1(2), Russia 1(1). Gerard Piqué (Spain) converts the penalty with a right footed shot to the bottom left corner.
Goal! Spain 1(1), Russia 1(1). Fedor Smolov (Russia) converts the penalty with a right footed shot to the bottom left corner.
Goal! Spain 1(1), Russia 1. Andrés Iniesta (Spain) converts the penalty with a right footed shot to the centre of the goal.
Penalty Shootout begins Spain 1, Russia 1.
Second Half Extra Time ends, Spain 1, Russia 1.
Attempt saved. Rodrigo Moreno (Spain) left footed shot from outside the box is saved in the bottom left corner. Assisted by Iago Aspas.
Corner, Russia. Conceded by Jordi Alba.
Attempt missed. Sergio Ramos (Spain) right footed shot from very close range is close, but misses to the right. Assisted by Koke with a cross following a set piece situation.
Isco (Spain) wins a free kick on the left wing.
Foul by Sergei Ignashevich (Russia).
Attempt blocked. Gerard Piqué (Spain) left footed shot from the right side of the box is blocked.
Isco (Spain) wins a free kick on the left wing.