Toronto: Portugal booked their place in the Round of 16 after a dramatic 2-1 victory over Croatia on Thursday, with a VAR decision in the 109th minute denying Croatia a last-gasp equaliser in one of the most dramatic matches of the World Cup.

The contest swung from end to end before referee Espen Eskås brought proceedings to a close after more than 100 minutes of football.

Croatia believed they had forced extra time deep into stoppage time when Joško Gvardiol found the net, only for the goal to be ruled out for offside following a lengthy video review.

The decision ended Croatia's hopes and left captain Luka Modrić, likely appearing at his final World Cup, visibly devastated at the final whistle.

Portugal, led by Cristiano Ronaldo, survived the late scare to progress to the knockout stage.

Portugal strike in stoppage time

After 90 minutes ended level, the fourth official signalled 10 minutes of added time.

Portugal broke the deadlock in the 94th minute when Rafael Leão delivered a curling cross that substitute Gonçalo Ramos headed past the Croatian goalkeeper.

The goal sparked jubilant celebrations as Portugal appeared set to secure victory.

VAR denies Croatia

Croatia launched one final attack in the 103rd minute.

Ivan Perišić whipped a cross into the penalty area, where Igor Matanović appeared to make a slight glancing header before the ball deflected off Mario Pašalić and rolled across goal for Gvardiol to finish.

The celebrations were short-lived.

VAR reviewed whether Matanović had touched the ball before it reached Pašalić, who was standing in an offside position.

Using semi-automated offside technology and the sensor inside the match ball, officials confirmed Matanović had made contact with the cross before it reached Pašalić.

After reviewing the footage on the pitch-side monitor, Eskås announced that the goal was ruled out for offside.

Portugal's players celebrated the decision, while Croatia's players and supporters were left heartbroken. Some supporters threw bottles onto the pitch, briefly delaying the restart.

Match turned after the break

Neither side created many clear opportunities in a cautious first half.

Croatia took the lead in the 53rd minute through Perišić before Portugal responded strongly.

Leão struck the crossbar from distance, while Ronaldo thought he had scored his first World Cup knockout-stage goal only for the effort to be ruled out for a marginal offside.

Portugal head coach Roberto Martínez then introduced four substitutes in a bid to change the game while keeping Ronaldo on the pitch.

The move paid off when Portugal won a penalty after defender Renato Veiga was brought down in the area. Ronaldo calmly converted from the spot to level the match.

Diogo Costa keeps Portugal alive

Croatia continued to press for a winner, but Portugal goalkeeper Diogo Costa produced a series of crucial saves.

He denied Matteo Kovačić twice before making an outstanding stop to keep out Matanović from close range.

Petar Sučić also had the ball in the net, but the effort was ruled out for offside.

Ronaldo was substituted in the 81st minute and, after leaving the pitch, wore a shirt bearing the name of former Portugal teammate Diogo Jota, who died in a car accident exactly one year earlier.

Following the final whistle, Croatia head coach Zlatko Dalić criticised the increasing influence of VAR in football.

"All these decisions take the joy out of football. I'm not saying VAR can't sometimes be of help, but it kills the emotion of the game," Dalić said.

"It kills everything within you. It kills what you are experiencing in the moment. Football should be fair. We've gone too far with VAR."