World Cup 2018: Lucky Diego Costa goal sees Spain edge past dogged Iran in group B
2010 winners on course to qualify as they move on to four points following confidence-building win
The victory in Kazan puts the 2010 winners on course for the last 16.
Costa, who scored twice in a 3-3 opening draw with Portugal in Sochi, courted controversy early in the group B encounter when he stepped on the toes of Iran goalkeeper Ali Beiranvand.
His gesture went unpunished, and the Atletico Madrid striker required another stroke of luck on 54 minutes when his shot came off Ramin Rezaeian to beat Beiranvand after he had been sent through by Andres Iniesta.
Just before the hour mark, the entire Iranian bench poured onto the pitch when Saeid Ezatolahi fired an equaliser for Iran.
But the thousands of Iranian supporters that filled the stadium with the sound of vuvuzelas throughout were left disappointed when it was ruled out for offside.
With three points from two matches, Iran still have a chance of qualifying if they can get a result against Cristiano Ronaldo’s Portugal on Monday.