U.S. Markets close in 4 hrs 31 mins

Spain in prime position to reach knockout stages after squeezing out win against Iran

Spain was hell-bent on winning its second match at the 2018 World Cup after Cristiano Ronaldo made La Roja settle for a point in their opener against Portugal.

Iran made them earn it Wednesday in Kazan.

Spain, the 2010 champions, got a good scare from Team Melli but eventually prevailed 1-0 through a fortunate Diego Costa goal.

The victory puts Spain in position to advance to the knockout phase on Monday against already eliminated Morocco. Meantime, Iran can move on by upsetting Portugal the same day.

This could have gone very differently for Spain

The overwhelming favorite coming into the match, the Spanish can count their lucky stars that they escaped with all three points. Seriously. Iran frustrated its all-world foe for most of the match (more on that later) and had Karim Ansarifard not pulled his shot wide just seconds before Costa’s winner, Iran could well have remained atop Group B.

It’s not like Costa’s goal was convincing. After the ageless Andres Iniesta played him through, the Spaniard had the ball knocked off his foot by Ramin Rezaeian, only for the defender’s clearance to deflect off Costa’s knee and past keeper Ali Beiranvand.

Iran appeared to have equalized before VAR correctly ruled for offside (more on that later, too), and came close again twice within the last quarter of an hour, but Mehdi Taremi was unable to convert either chance.

Spain survived in the end, and won’t slip up against Morocco. But can this team, a pre-World Cup favorite that fired its coach literally on the eve of the tournament, actually win the whole thing? It’s hard to see it based on Wednesday’s evidence.

Diego Costa scored a fortunate goal for Spain in its narrow win over Iran. (Getty)

Iran’s defensive masterclass was no accident

Some would call it parking the bus, and it was, as Iran clogged the box with almost its whole starting lineup at times, forcing Spain to try to break them down with intricate combination play.

On several occasions, Spain – known as one of the best passing teams the world has ever seen – came close to breaking Iran down with almost telepathic interplay, to no avail. It was gorgeous to watch nonetheless. But there was also something beautiful about Team Melli’s all-for-one destroying. Expertly drilled by coach Carlos Queiroz, Iran collapsed in front of its own goal and defended as a unit by closing down passing lanes. The few times Spain came close, someone managed to stick out a knee or a foot and end the danger. Twice Spain got all the way through during the first hour, but Beiranvand came through with huge stops both times.

VAR again plays major role

On another night, the result could’ve been different. In a previous World Cup, it almost certainly would have been. It was hard to see the infraction in real time when Iran’s Saeid Ezatolahi looked to have tied it about an hour in, but replays clearly showed the ball hitting an offside Ezatolahi in the sequence leading to the apparent goal.

The officials on the field seemed unsure, but the proper call was quickly determined after review. It was the latest example at this World Cup – the first to employ the practice – of VAR eliminating a clear and obvious error on the field.

Iran-Portugal will be a must watch

As more and more teams punch their tickets to the second round with a game to spare (Russia and Uruguay became the first teams to move on earlier Wednesday), Team Melli’s tilt against Ronaldo and Co. will take on added significance.

After its morale-boosting showing versus Spain, Iran has to like its chances of pulling off the upset against the Portuguese when the two teams meet in Saransk on June 25. You can be sure that Portugal native and ex-Selecao coach Queiroz would love nothing more.

Doug McIntyre covers soccer for Yahoo Sports. Follow him on Twitter @ByDougMcIntyre.

More World Cup on Yahoo Sports:
Portugal turns back Morocco thanks to early goal by – guess who? – Ronaldo
Burger King apologizes for offering Whoppers impregnated by soccer players
Female reporter sexually assaulted during live World Cup broadcast in Russia
Mexican star with alleged ties to drug cartels wreaks havoc for sponsors