It was a night not short on controversy as injury time goals in both Group B games, meant Spain finished top after their dramatic 2-2 draw with Morocco.  A late penalty for Iran ensured their 1-1 draw with Portugal meant Fernando Santos’s men finished second.

Spain and Portugal were neck and neck going into the final round of games, both on four points only separated by the ‘fair play’ rule, with Iran just behind on three points.

A defensive mistake from Spanish veterans Andres Iniesta and Sergio Ramos allowed Khalid Boutaib to run in on goal and slot through the legs of David De Gea in the Spanish net.

Spain weren’t behind for long, as Isco equalised five minutes later after some sublime link-up play between with Iniesta who made up for his error with an assist. Morocco took the lead once more as a brilliant header from Youssef En-Nesyri left De Gea rooted.

An Iago Aspas flick in the 91st minute was enough to salvage a point for Spain in dramatic fashion as VAR was required to make sure it wasn’t offside.

It seemed Ricardo Quaresma’s outside of the foot finish was going to ensure Portugal’s place at the top of Group B, even after Cristiano Ronaldo had a penalty saved. However, another contentious decision in stoppage time meant Iran were awarded a penalty which Karim Ansarifard scored.

Iran had a chance to knock out the reigning European champions right at the death, as a ball broke to Iran’s Taremi but his shot hit the side netting.

An incredible night of controversy meant Spain finished top of Group B with Portugal coming in second both on five points, both level on goal difference but La Roja came out on top due to goals scored.

Uruguay will face Portugal in the first knockout game of the 2018 World Cup on Saturday at the Fisht Olympic Stadium, while Spain will take on hosts Russia on Sunday at the Luzhniki Stadium.