SARANSK - Portugal advanced to the World Cup round of 16 behind Spain from Group B after a stunning Ricardo Quaresma strike was cancelled out by a stoppage-time penalty by Iran's Karim Ansarifard on Monday after Cristiano Ronaldo had himself missed from the spot.
The 1-1 draw meant Portugal finished tied on five points with Spain, who drew 2-2 against Morocco to top the group by scoring more goals, and set up a second round clash with Group A toppers Uruguay in Sochi on Saturday.
Portugal were left to rue a missed penalty by talisman and captain Ronaldo in the 53rd minute after goalkeeper Alireza Beiranvand pulled off a heroic save to deny them a 2-0 lead.
On the stroke of halftime Quaresma, making his World Cup debut at the age of 34, played a one-two with Adrien Silva to cut in from the right flank and curled the ball past the outstretched hands of Beiranvand with the outside of his boot.
However, Iran equalised in stoppage time after Paraguayan referee Enrique Caceres used the video assistant referee (VAR) system to rule that Portugal's Cedric Soares had handled the ball in the box.
Ansarifard converted the resulting penalty to level the score, pushing the European champions to second spot in the group behind Spain.
A minute later Iran came close to sealing their first spot in the last 16 and knocking out Portugal but Mehdi Taremi could only hit the side-netting from close range.
Caceres consulted with VAR to award Portugal a penalty for Morteza Pouraliganji's foul on Ronaldo amid vociferous protests from the Iranians and their numerous supporters at the Mordovia Arena.
The Real Madrid forward, however, failed to convert, also losing the chance to tie England's Harry Kane at the top of the scorers' list on five goals.
"We have achieved our goal and now we have to recover over the next few days to think about the next match," Quaresma told reporters. "Now we have to continue with this mindset of winning and wait for the next match."
Iran were well organised at the back and defended stoically but did not have enough men going forward.
Carlos Queiroz's men relied mostly on counter attacks and while forward Sardar Azmoun showed plenty of glimpses of his talent, it was not enough to deny the Portuguese.
"It's such a big disappointment for us," Iran midfielder Alireza Jahanbakhsh said. "We had a big chance at the end of the game, we could have scored and won it. As everyone has seen, we did our best to win this game but we missed some chances."
Portugal had faced a lot of criticism for their lacklustre display and inability to hold possession in their 1-0 win against Morocco last Wednesday but they appeared determined to set that right against the Asian powerhouse.
They dominated possession, playing almost three times the number of passes than their Asian opponents, and were more intent on creating chances through the midfield rather than just directing long balls towards Ronaldo.
Spain will meet hosts Russia at Moscow's Luzhniki Stadium on Sunday.
For more sports coverage, visit the ABS-CBN Sports website.