Portugal scraped through as one of the best third place teams to book an encounter with Croatia at the last 16 of Euro 2016 tournament.

It was a nail biting encounter in a game that had national pride and personal integrity at stake but in the end both sides shared the spoils in a 3-3 final pact.

Three times in the same game, the Portuguese were on the verge of an embarrassing first round exit from the tournament but three times Christiano Ronaldo reacted and he did so with panache, setting up Nani and scoring a brace, one of which could pass for the tournament's best goal.

Hungary looked the hungrier of the two  with Zoltan Gera opening scoring in the quarter of an hour but Christiano released Nani in the 41st minute for an important equalizer before recess.

Then the drama began to unfold in the second half. Baladzs Dzusudzak from the same spot, 25 yards from goal, delivered breath taking free-kicks all of which took wicked deflections before entering the net.

Ronaldo was livid; Portugal were porous in defence and looked destined for an early exit but the big Real Madrid man who is no stranger to big games rose to the occasion with an audacious back heel and  a glancing header to save the blushes of the Portuguese side.

Placing a distant third from a group that had Hungary and Iceland-the team with supposedly small mentality- Portugal will count themselves lucky to have gotten through to the last 16.

Hungary were lethal in attack; Portugal were leaky in defence but it was the class of Christiano Ronaldo that made the difference for the Portuguese side who now have a tall order against a disciplined Croatian side who beat the defending champions Spain.