Recovering from the shock departure of Julen Lopetegui just a day before the tournament's start wasn't going to be an easy taskfor new coach Fernando Hierro's Spain team. However, after a Cristiano Ronaldo hat-trick sealed a late point for Portugal to put a dampener on Hierro's first game in charge last Friday, a hard-fought win against Iran on Wednesday night sees Spain sit joint top of Group B, going into the final group game.
VAR to the rescue
Iran, who started the day ahead of Spain following their 1-0 win over Morocco, were no pushovers in Kazan on Wednesday night. Though Spain had the lion's share of the possession, a fortunate rebound off Diego Costa's knee provided the only goal of the contest.
Having defended in a 6-3-1 formation until the go-ahead goal, Iran suddenly flew out the traps and Karim Ansarifard's volley from the edge left David de Gea motionless but found the side netting.
Mehdi Taremi also came close with two headers, but Iran thought they had earned an equaliser when Saeid Ezatolahi poked home from close range, only for the VAR to spot that he had strayed offside when the ball was flicked on.
'The game of the tournament'
The drama in Kazan, nonetheless, still doesn't match up to what is being described as the game of the tournament so far, when Spain and Portugal played out an entertaining draw in Sochi on Friday.
Cristiano Ronaldo gave his side an early lead in the Group B opener when he won and then converted a penalty in the fourth minute.
Spain, however, levelled it in the 24th minute when Diego Costa used his strength to beat Pepe to the long ball before lashing the ball low past a helpless Rui Patricio.
Despite controlling the play, Spain gifted Portugal a second goal just before half time when Ronaldo's powerful low shot crept into the corner after keeper David De Gea failed to get his whole body behind the ball.
Hierro's side reemerged in the second half in control and made their dominance pay when Diego Costa bagged his second, prodding home Sergio Busquets' headed knock-down a matter of yards from the goal line.
Just three minutes later, Spain had the lead for the first time on the night. The goal came from an unlikely source as stand-in right-back Nacho smashed home a half volley from the edge of the area.
Despite having more than half an hour still to play, this looked to be the winner as Spain played a possession game and Portugal's players started to tire.
But when Gerard Piqué conceded a freekick on the edge of the area with two minutes left on the clock, up stepped Ronaldo and placed the ball in the top corner leaving De Gea rooted to the spot.
Coach Hierro knew that Spain's route out of the group wasn't going to be easy. Following the Iran win, the Vélez-Málaga man admitted that his team needed to improve, but pointed out that "no one is having an easy time in the World, as we have seen".
Spain take on Morocco in the final group game on Monday, knowing that a draw will do, providing Iran don't beat Portugal.