There is a long way to go before they can think about qualifying for the knock-out stages, though. Any hopes of advancing now rest on being able to spring a surprise in this fixture and their final group game against Portugal on 25 June.
However, rising above adversity has been a theme for Iran during qualification and the build-up to this tournament.
Spain came into the event as one of the big favourites, having dominated in major football tournaments between 2008 and 2012.
But coach Julen Lopetegui's sacking on the eve of their opening match last week threw a spanner in the works and Portugal's Cristiano Ronaldo rubbed further salt into the wounds with his heroic late equaliser in Sochi.
Spain made a shock exit in the group stages of the 2014 World Cup following a humiliating 5-1 defeat by the Netherlands, so they will be keen to avoid a similar fate this year.
Iran coach Carlos Queiroz: "If the game against Morocco was the World Cup final for us, the game against Spain will be the Universe Cup final.
"It was not a miracle that we won. What can happen once in a while is a group of people, when they are united, can create super stories and super things. Our attitude is to try and make the impossible possible."
Spain midfielder Isco: "It's a crucial match that will determine our World Cup destiny. We want to score from the opening minute, even though that won't be easy.
"We will stick to the style that defines us as a team, but we have to pass the ball around a lot more and maintain possession. If we play quickly across the pitch, the chances will come. I hope we score quickly."
This will be the first encounter between Iran and Spain.
Iran are winless against European opposition at the World Cup, having lost five of their six previous fixtures (D1).
Spain are unbeaten against Asian opponents at the World Cup (W2, D2), though they did lose on penalties after one of those draws (against South Korea in 2002).
In their 1-0 victory over Morocco, Iran became the first team since 1966 to score a goal without attempting a shot during a half of World Cup football - their winner was a 90th minute own goal by Morocco's Aziz Bouhaddouz.
That goal was scored after 94 minutes and seven seconds - it was the latest winning goal in a World Cup match since June 2006, a Francesco Totti penalty against Australia for Italy in a 1-0 win (94:24).
Their last three World Cup goals have all come in the final 15 minutes of matches - they have never scored before the 36th minute at a World Cup,
Iran could become the first Asian team to win consecutive World Cup matches since South Korea in June 2002.
Spain have been eliminated at the group stage in two of the last three World Cup tournaments in which they have failed to win their first match (1998 and 2014) - however, they won the tournament on the other occasion, doing so in 2010 despite losing their first match to Switzerland.
Spain have conceded 10 goals in their last four World Cup matches - as many as in their previous 15 World Cup matches combined.
Diego Costa has scored eight goals in his last eight international starts for Spain - he scored with both of his shots on target in their 3-3 draw with Portugal.