It took them almost two-thirds of their Group B clash to achieve it, but Spain finally broke down a stubborn Iranian defence to claim a vital win in Kazan.
Iran started the game with good intent, looking to catch the Spanish napping in the early exchanges, but once the game settled, the Spanish took control, dominating possession and creating chances almost at will.
But despite the match being almost a glorified game of defence versus attack, Spain were unable to break down Iran’s back line until mid-way through the second half, with a somewhat fortuitous goal by in-form striker Diego Costa.
David Silva and Andres Iniesta linked up on the edge of the box, and the latter fed the ball in to Costa, who turned smartly and was challenged by Iranian defender Ramin Rezaeian.
But, unfortunately for Iran, his challenge saw the ball ricochet off Costa’s shin, past goalkeeper Alireza Beiranvand and into the bottom corner.
Not exactly the way he planned it, but he won't care. Diego Costa scores his third of the tournament and Spain take the lead over Iran. #IRN #ESP pic.twitter.com/Wm4dZzaKc0
— The Athletic Soccer (@TheAthleticSCCR) June 20, 2018
Iran thought they’d equalised just after the hour mark when Saeid Ezatolahi fired through David De Gea’s legs after a free-kick routine.
But the Iranian side’s wild celebrations were cut short when the goal was ruled out for offside – firstly by the officials on the field, then confirmed by the VAR officials in the booth.
Iran have the ball in the back of the net but it's correctly ruled out for offside. #IRN #ESP pic.twitter.com/1Bva4Pn90W
— The Athletic Soccer (@TheAthleticSCCR) June 20, 2018
Iran then spurned another golden chance when Vahid Amiri nutmegged Gegart Pique and crossed beautifully for the fast-arriving Mehdi Taremi, who couldn’t keep his header down.
Costa was replaced to a standing ovation with two minutes remaining after another superb performance leading the line for Spain.
And his matchwinning contribution means Spain will go into the final round of group games against Morocco knowing they have to better Portugal’s result over Iran to go through as Group B winners.