Portugal sealed progress to the last 16 of the World Cup after a 1-1 draw against Iran on Monday night - but it was by the skin of their teeth.
A stunning effort from Ricardo Quaresma at the end of the first half looked to be the decisive goal in the tense Group D affair, before Iran equalised from the penalty spot in stoppage time.
The Portuguese side set the tone for the game from early on, with Cristiano Ronaldo's early shot in the third minute - before Joao Mario firing over after a rapid attack from Portugal.
Joao Mario then fired over after a quick attack from Portugal, before the Iranian goalkeeper spilled a cross but was fortunate to survive his error.
The first half quickly became a defence versus attack training session, with Iran sitting deep while Portugal piled on the pressure, without being able to create any concrete chances.
With less than ten minutes to play before the end of the match, Iran made a couple of dangerous moves into the opposition box, but Portugal managed to clear their lines.
Just as Portugal manager Fernando Santos was preparing his half time team talk, Ricardo Quaresma produced a moment of magic in the last minute of the half to send the European champions in with a lead at the break.
After a lovely interchange with Adrien Silva outside the box, Quaresma curled the ball into the top corner with the outside of his right boot - certainly one that will be on the 'Goal of the Tournament' shortlist.
Portugal were awarded a penalty in controversial fashion towards the start of the first half as Cristiano Ronaldo was fouled in the box. After initially waving away any appeals for a penalty, a word in the referee's ear saw him quickly run over to the touchline.
He subsequently awarded a penalty, which Cristiano Ronaldo took - in a bid to catch up with Harry Kane in the race for the golden boot.
The five time Ballon d'Or winner stepped up, and stunned the football world into silence as he saw his poor penalty saved comfortably by Beiranvand in the Iranian goal.
As the second half grew on, the game became very much similar to the majority of the first half. That was until, however, there was another controversial VAR moment as the referee decided to award a penalty to Iran after much deliberation on the touchline.
Karim Ansarifard dispatched his spot kick right into the top corner to see Portugal progress in second place, securing an exciting last 16 tie against Uruguay.