Portugal reached the knockout stages of the World Cup on Monday night, but only just after Iran claimed a surprise draw on an extraordinary night of football in Mordovia.
In what turned out to be a fiery encounter, VAR took centre stage after referee Enrique Cáceres handed Iran a controversial late penalty that saw Carlos Queiroz's side grab a late equaliser to cancel out Portugal's lead.
The European champions took the lead in the 45th minute when forward Ricardo Quaresma produced a moment of magic after he collected the ball on the touchline before then curling the ball beyond goalkeeper Alireza Beiranvand with the outside of his foot.
Ronaldo, meanwhile, later saw his 53rd-minute penalty saved by Beiranvand to deny the Real Madrid forward the opportunity to go level with Harry Kane in the race for the Golden Boot.
Yet more controversy
Pablo Zabaleta is furious in the studio and says the VAR issues ruined the second half. It really was VAR at its worst - both penalty decisions looked wrong and now all we're talking about is the refereeing decisions rather than anything any of the players did.
Zabaleta genuinely looks so upset.
Full-time Iran 1 Portugal 1
The final whistle goes and it finishes Iran 1 Portugal 1. What a game, so much incident. The managers confront each other at the final whistle but end up hugging.
Iran are out; Portugal finish second in the group and will play Russia in the last 16. Blimey, what a ridiculous match.
Genius
Iran have played really well but they were powerless to stop a moment of absolute genius from Quaresma, whose goal with the outside of his right boot separates the sides.
As it stands Portugal are top of Group B and will play Russia in the last 16. Iran must score and hope Spain concede if they are to go through (or score twice themselves and render what happens in the Spain game irrelevant).
15 min Iran 0 Portugal 0
Portugal win a couple of corners and unsurprisingly stick them right under Beiranvand's crossbar. He deals with them a bit more comfortably.
Meanwhile in Kaliningrad, Morocco have taken a shock lead against Spain. As it stands, Spain will still be going through but an Iran goal here would send them packing.
14 min Iran 0 Portugal 0
Iran's goalkeeper Beiranvand comes flapping out at Quaresma's cross and gets nowhere near it. Thankfully for him Hosseini is there to hack the ball away. Moments later, Beiranvand completely spills another Quaresma cross, but again his defenders mop up the danger. Horrible moments for Beiranvand.
11 min Iran 0 Portugal 0
What a mix-up that is! Beiranvand is absolutely furious after Ezatolahi seemingly ignores his goalkeeper's shout and clears Adrien Silva's cross straight to Joao Mario. Joao Mario should do better but blazes an effort over the bar from the edge of the area. Beiranvand shoves Ezatolahi in the chest in frustration.
Lovely to see.
1 min Iran 0 Portugal 0
We're under way in Saransk. Iran will qualify with a win; Portugal need just a point to go through, and to better Spain's result to top the group.
The group winners play Russia in the last 16; the runners up will play Uruguay.
A reminder of the teams for this one.
Iran (4-3-2-1): Beiranvand; Ramin, Hosseini, Pouraliganji, Safi; Jahanbakhsh, Ezatolahi, Omid; Mehdi, Amiri; Sardar
Portugal (4-4-2): Patricio; Cedric, Pepe, Fonte, Guerreiro; William Carvalho, Adrien, Joao Mario, Quaresma; Andre Silva, Ronaldo.
Those Portugal changes in full
Now pay attention 007, because this is a little Silva-heavy.
Andre Silva, Adrien Silva and Ricardo Quaresma come in, while Goncalo Guedes, Bernardo Silva and Joao Moutinho drop to the bench. Iran replace Karim Ansarifard with Alireza Jahanbakhsh.
Down to the wire
There is the possibility that tonight could end in sensational fashion with the drawing of lots. That is if Portugal and Spain both win or draw with the exact same scoreline and end up with the same number of bookings (Spain as it stands have one fewer booking).
The draw would take place at the Luzhniki Stadium in Moscow at 9pm BST this evening. It couldn't happen, could it?
Spain take on Morocco in tonight's other game.
Team news
Iran (4-3-2-1): Beiranvand; Ramin, Hosseini, Pouraliganji, Safi; Jahanbakhsh, Ezatolahi, Omid; Mehdi, Amiri; Sardar
Portugal (4-4-2): Patricio; Cedric, Pepe, Fonte, Guerreiro; William Carvalho, Adrien, João Mario, Quaresma; Andre Silva, Ronaldo.
Three changes from the team that scraped to a 1-0 win over Morocco.
The Ronaldo roadshow rolls on
The final group games continue tonight, with Portugal in action against Iran. A draw will be enough for Portugal to qualify for the group stages, while Iran will qualify with a win. The picture is complicated by what Spain do against Morocco in the group's other match tonight, but essentially Portugal need to better Spain's result to top the group.
There's a big incentive in topping the group because the winners will face Uruguay rather than Russia in the last 16. Earlier today Uruguay were very effective in brutally dismissing the hosts Russia 3-0 in Samara.
Back to Group B and the matter in hand ... Portugal will be hoping not only to win but to produce a performance more convincing than the turgid fare they produced in Wednesday's 1-0 win over Morocco. Manager Fernando Santos is known for his pragmatic tactics, but even he accepted Portugal were disappointing in the way they sat back after taking an early lead.
Cristiano Ronaldo was of course the man who scored their goal to add to his hat-trick against Spain on match day one. Ronaldo has scored all of Portugal's goals at this World Cup, and he will be desperate to get a couple tonight to leapfrog Harry Kane in the Golden Boot race. Ronaldo will also want to make a point to Iran manager Carlos Queiroz after the pair fell out at the 2010 World Cup when Queiroz was Portugal manager.
Queiroz, for his part, will be focused on stopping Ronaldo tonight as his team look to build on their impressive - if ultra-defensive - performance against Spain last time out. Iran ended up losing 1-0 but were very close to nicking an unexpected point.
Given their need for a win tonight, Iran will at some point need to come out and attack. Don't expect that to happen until the latter stages though, especially if Portugal fail to score early.
Portugal should get this done, but they're going to have to work for it.