Heading into the tournament in Russia, Iran had previously only won a single game at a World Cup against the United States in 1998, however after a tight and testing 90 minutes against Morocco, Iran were gifted a late victor thanks to an own goal in additional time.
Needing a goal, Iran changed strategy and it almost paid off when Saeid Ezatolahi thought he had leveled but his goal was ruled out after the use of VAR. "We only have one thing in mind".
The technology has been implemented at the World Cup for the first time this year and has already - less than a week into the tournament - been the focus of much debate . The problem was that Iran left no space in behind, and Vazquez, hardly a superior combination player, looked a man out of sync with his teammates when building in front of the defence.
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 'keeper Ali Beiranvand as he waited to kick the ball out.
But Iran refused to buckle, Carlos Queiroz's men coming close in the final minutes when midfielder Mehdi Taremi headed just over.
Croatia Welcomes Historic Agreement between Macedonia and Greece
On Sunday, Greek police fired tear gas at a crowd protesting on their side of the border, not far from the signing ceremony. After nearly three decades of dispute, the northern neighbour of Greece should soon become North Macedonia.
Spain continued to apply strong pressure in the second half and Beiranvand stopped a strike from Sergio Busquets in the 49th minute with a superb one-handed diving save.
Costa's goal proved the difference between the sides.
They need to try because Costa, who has been at his battering-ram best, might not provide a get-out-of-jail card every time Spain play.
The sacking of coach Julen Lopetegui before the tournament was followed by a last-minute equaliser by Portugal in their opening game.
The disruptions to Iran's preparations for the tournament were more geo-political in nature with USA sanctions against the nation costing them a couple of their warm-up matches and their kit deal with Nike.
Another chance came and went some 20 minutes later, when Vahid Amiri brilliantly nutmegged Gerard Pique and sent in a cross from the left to find Taremi in the box. Their service includes Fox Sports 1, Fox and Telemundo (in most markets) so you can stream the game with English or Spanish commentary.