Portugal reached the last 16 of the World Cup as Group B runners-up after a controversial 1-1 draw with Iran in Saransk
 Ricardo Quaresma scored a sublime goal in the 45th minute and Cristiano Ronaldo had a penalty saved in the second half as Portugal appeared to be cruising through as group winners
But Ronaldo was perhaps fortunate to avoid a red card following an 80th-minute VAR review and Iran equalised through a dubious injury-time penalty from Karim Ansarifard - awarded with the use of VAR for a handball by Cedric Soares - before Mehdi Taremi missed a gilt-edged chance late on to knock Portugal out
The result, combined with Spain's late equaliser in their 2-2 draw with Morocco - means Portugal will play Uruguay in the next round on Saturday evening, while Iran are eliminated
A win would have taken Iran through, but after frustrating their opponents for 45 minutes Quaresma struck on the stroke of half-time
 He swapped passes with Adrien Silva on the right, before striking sweetly with the outside of his right foot from the edge of the area, giving Ali Beiranvand no chance in the Iran goal
Portugal were given a penalty eight minutes after half-time when Ronaldo skipped past a pair of defenders and went down under a challenge from Saeid Ezatolahi
 Paraguayan referee Enrique Caceres initially waved away the appeals, but eventually awarded the spot-kick after the VAR recommended he review the incident
However, Ronaldo's penalty was well saved by Beiranvand, who dived to his left and gathered the ball at the second attempt, frustrating the Real Madrid star's hopes of catching England's Harry Kane at the top of the Golden Boot standings
The second half became increasingly ill-tempered and Ronaldo avoided a red card when VAR asked the referee to review his off-the-ball swing of the arm at in the direction of Morteza Pouraliganji 10 minutes from full-time
 After watching replays at the side of the pitch, Caceres decided a booking was sufficient
However, Portugal were frustrated by a VAR decision in injury-time when Sardar Azmoun headed a corner onto the arm of Soares at close range
 After a three-minute delay, the referee controversially awarded a penalty which was lashed into the roof of the net by Ansarifard (90+3)
And there was further drama when Taremi looked certain to score the winner that would have taken Iran through a minute later, but hit the side netting from six yards instead of scoring what would have been the most famous goal in his nation's history
Portugal, who were top of the group going into injury-time, survived a chaotic climax and must now re-focus ahead of their knock-out clash in Sochi on Saturday
This was a match full of drama and controversy - in which the key figure was the Paraguayan referee and his assistants in Moscow
 However, the one moment of quality in the match came from the right foot of Quaresma
 Portugal had been frustrated by a well-disciplined Iran side for 45 minutes and had barely had a shot at goal before the Beskitas forward struck a sublime curler that turned the match on its head and prompted the second-half drama
 Quaresma was substituted after a running battle with Saeid Ezatolahi after the break, but the veteran's goal on his first World Cup start will live long in the memory
Iran's World Cup is now over, while Portugal will face Uruguay in Sochi on Saturday evening (7pm kick-off) as they bid to reach the quarter-finals
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>
<PAD>