They must now go on to beat Portugal in their final game to be in with a chance of progressing from Group B.
It took Spain the entirety of the first half to come to terms with Iran's defensive zealotry; space was restricted and constricted, but with unusual fury, speed and aggression.
Striker Diego Costa did brilliantly in the box to turn his marker but his initial shot rebounded of the legs of the defender and ricocheted off his knee and into the net to give Spain a 1-0 lead.
They have yet to score a goal off their own boot this tournament and fans will have torn their hair out after Mehdi Taremi headed over the bar from six yards out in the 82nd minute.
Iran went down narrowly to Argentina at the last World Cup with a similarly battling performance only, exhausted by their efforts, lost 3-1 to Bosnia and Herzegovina in their final group match.
4 things we learnt from Brazil’s 1-1 draw with Switzerland
Ten of the fourteen fouls they committed were on forward Neymar . World Cup Group E game between Brazil and Switzerland .
By the end of a pulsating opening half in which Iran's defence thwarted the few real chances La Roja were able to create, Hierro's men left the pitch looking rather red-faced.
"Everybody knows that Spain is one of the greatest teams in football history, and one thing that we can guarantee is that the Spanish team will not have an easy time against us", he told reporters. Whose side are you as the Spaniards take on the Iranians?
The World Cup match between Spain and Iran will be broadcast live on FS1.
While only one of them was a clear-cut opportunity Silva dropped deeper after the break and looked to gather the ball further away from goal. He has scored three goals in two matches, but he can do even better.
Costa has now scored nine goals in his last nine global starts for Spain. The Man City star is likely to start again against Iran and his influence will be crucial if Spain is to pick up their first victory of the 2018 World Cup.