Spain moved top of World Cup Group B with a hard-fought 1-0 victory over Iran on Wednesday.
Play-acting on Iran's part overshadowed a dismal first half of World Cup football between the two nations, so a slice of luck was needed when Diego Costa ricocheted home the winner for Spain and his third goal of the tournament.
Dani Carvajal was a doubt for the Russian showpiece after he pulled up with a hamstring injury during the Champions League Final, but the Real Madrid right-back was fit enough to take the place of Nacho Fernandez, despite his goal in the 3-3 draw with Portugal.
Elsewhere, Lucas Vazquez came into Spain's supporting cast for Diego Costa in attack, with Koke making way as Andres Iniesta dropped into central midfield alongside former Barcelona teammate Sergio Busquets.
Iran, on the other hand, beat Morocco 1-0 courtesy of a last-minute goal in their first game and lined up with the 'Iranian Messi' Sardar Azmoun as their lone striker.
The referee was Uruguayan Andres Cunha, who awarded the World Cup's first-ever VAR penalty during France's 2-1 win against Australia last weekend.
Portugal defeated Morocco 1-0 earlier in the day, so La Roja were desperate to get their first win of the tournament to keep up with their Iberian neighbours.
The opening 10 minutes saw Spain dominate possession, but no clear-cut chances were made by either side, with Hierro’s troops were looking to feed the dangerous Costa.
Iran were doing well to keep La Roja at bay, and they were frustrating the Spanish attack, who found it hard to break down Carlos Queiroz’s well-drilled defence.
The first chance Spain got was when David Silva's free kick took a deflection, but Iran goalkeeper Alireza Beiranvand managed to keep the effort out.
The next Spanish chance fell to Silva again, but he ballooned his strike over from close range and let Iran off the hook.
With half-time approaching, Spain were looking to break the deadlock and Silva managed to crack off a shot from the edge of the box, but a red shirt was again in the way to keep the scores level.
For all of Iran’s dogged persistence, however, they also resorted to play-acting and cynical tactics, Beiranvand notably not covering himself in glory when he made a meal of an encounter with Costa.
The first chance of the second half fell to La Roja, but Gerard Pique was unable to head home from close range. Minutes later, Sergio Busquets had his well-struck shot saved by the Asians’ glovesman.
Spain were knocking on the door and Isco was the next player to waste an opening, yet Iran went close soon after. Ansarifard’s thunderous volley hit the side-netting, tricking the Iran fans the other side of the stadium into thinking they had taken the lead.
Nonetheless, their patience had finally paid off as Costa had some good fortune when the ball ricocheted off his knee, giving Spain a deserved lead.
Just when it looked like the 2010 World Cup winners would start to run riot, Iran had looked to have equalised through Ezatolahi, but to their dismay, their goal had been adjudged offside by the VAR.
A goal-line scramble from a well-worked corner almost saw Spain double their lead, but Iran's defence managed to just about deal with it.
Iran gave Spain another scare with 10 minutes left, when Amiri nutmegged Gerard Pique and his cross found Taremi, but the attacker was unable to divert his header on target.
The result left La Roja top of Group B via the fair-play tiebreaker for receiving the least number of yellow cards in their pool.
Iran 0-1 Spain
Iran: Beiranvand; Rezaeian, Pouraliganji, Hosseini, Hajsafi (Mohammadi 69); Ezatolahi; Taremi, Amiri (Ghoddos 86), Ansarifard (Jahanbakhsh 74); Azmoun
Spain: De Gea; Carvajal, Pique, Ramos, Alba; Busquets, Iniesta (Koke 71); Silva, Isco, Vazquez (Asensio 80); Costa (Rodrigo 89)
Referee: Cunha (URU)
Words: Rajan Hothi (@TalkStfc)