It was 1-1 after extra time and Akinfeev saved spot-kicks from Jorge "Koke" Resurreccion and Iago Aspas while four of his teammates all scored as Russian Federation won the shootout 4-3.
An error in Spain's defense let Russian Federation level in the 41st, after Gerard Pique's raised arm blocked a header by Artyom Dzyuba at a corner.
"We were hoping for penalties", Akinfeev said.
Dzyuba stayed alone up front, using his size and strength to disrupt Spain's defense, win headers and hold up the ball.
The teams meet at the Luzhniki Stadium on Sunday for a place in the quarterfinals, but Russia's progress even to this stage something of a surprise after most pre-tournament predictions viewed them as candidates to exit in the first round.
After the match, hero-goalkeeper Akinfeev said Russia's game plan all along had been to hold on for a penalty shootout. The 34-year-old Barcelona midfielder came off the bench and nearly won the game with an 85th-minute shot well saved by Akinfeev.More news: Is Donald Trump on a relentless quest to corner Iran?
He added: "We're having a fantastic World Cup". Russian Federation will face Croatia or Denmark in the quarter finals. We knew full well Morocco would fight, they have an excellent team, they only lost their two games 1-0 when they deserved much more.
It was the classic "tiki-taka" style that led to a World Cup title in 2010, bookended by a pair of European Championships.
Spain made 1,137 passes and completed 1,029, according to Federation Internationale de Football Association.
"We're insanely happy", Dzyuba said.
Since the match ended 1-1 after 90 minutes of regulation time, the issue rolled into overtime.
Spain subs: Daniel Carvajal, Andres Iniesta, Saul Niguez, Rodrigo Moreno, Thiago Alcantara, Lucas Vazquez, Alvaro Odriozola, Kepa Arrizabalaga, Cesar Azpilicueta, Nacho Monreal, Iago Aspas, Pepe Reina.More news: Amlo win to usher in new era in Mexico
There would be no happiness, Yes the misfortune has helped - in the end of the first half, the home team earned a corner kick.
It was finally in the 12th minute that Spain went ahead, the moment when 38-year-old Sergei Ignashevich, dived into the Spanish captain Sergio Ramos at the second bar, tapping a free kick in with his foot and scored an own goal. "We believed that order, discipline and dedication can beat class".
The match, which took place at the stadium "Luzhniki" and which was attended by thousands of spectators (among them the king of Spain), was hard and stressful.
The king heads FIFA's list of VIP guests for the round of 16 game, which also includes Russia's Prime Minister Dmitry Medvedev. Russian Federation had the third-greatest upset by differential since the FIFA rankings started in 1992, behind Nigeria's win over France in 1998 and South Africa's victory over France in 2010, both in the group stage. Spain's then-coach, Julen Lopetegui, was sacked two days before this year's World Cup after agreeing to take the Real Madrid job, and Fernando Hierro stepped in to take charge.
And Russia were then gifted a penalty when Pique handled in the box. Koke's miss gave Russian Federation the upper hand and Akinfeev sent the Luzhniki Stadium into bedlam as he saved Iago Aspas' penalty with his feet.More news: British 'A-team' divers are at the centre of Thailand cave rescue
- Tom Curran ruled out of England's white-ball matches against India
- Pompeo to head to North Korea as doubts mount about its intentions
- German political crisis: Angela Merkel is the great survivor once more
- UK Government planning to ban gay conversion therapy
- Moog Post Appeal To Save Jobs After 25% Trade Tariff Announced
- England and Colombia World Cup last-16 match goes to extra
- EPL: Courtois speaks on leaving Chelsea for Real Madrid
- Colombia ambassador ‘sad’ over Sun headline ahead of England World Cup clash
- Best Buy Stops Selling CDs Nationwide
- Canada Imposes Retaliatory Tariffs on US Goods