TORONTO - Cristiano Ronaldo scored the first World Cup knockout stage goal of his career, Goncalo Ramos netted a stoppage-time header and Portugal got a last-second break on an offside call to beat Croatia 2-1 on Thursday and set up a last 16 clash with Spain.Croatia looked to have equalised at the end, leaving Ronaldo crestfallen on the bench, but the last-gasp effort was ruled offside after a video assistant referee ‌review, prompting the ⁠team's supporters ⁠in the south end of Toronto Stadium to shower the pitch with debris.Ronaldo, 41, became the oldest player to score in ​the knockout stageof a World Cup when he fired home from the spot to draw Portugal level in the ​68th minute of a pulsating game before substitute Ramos rose above the Croatia defenders in the fourth minute of stoppage time.Also read: Tour de force: Led by Mbappé and an extraordinary supporting cast, France are the team to beat at this World CupThe goal for Ronaldo, who was taken out of the game by coach Roberto ​Martinez in the 81st minute, was his first in a World ⁠Cup knockout ‌game.Ivan Perisic had put Croatia in front when he brought down a pass ​from Josip Stanisic ​and coolly fired home at the far post in the 53rd minute ⁠as the game opened up considerably with incredible back-and-forth action.Portugal dominated possession ​in the first half but struggled to convert their chances on ​a night when a breeze off Lake Ontario offered reprieve from the sweltering heat that blanketed the city for much of the day.Ronaldo, booed heavily by Croatia supporters every time he touched the ball, failed to get his head on an early Pedro Neto cross and then he and Bruno Fernandes were unable to take advantage of a deep cross from Joao Cancelo.Croatia, World Cup runners-up in 2018 ‌and third in 2022, came roaring out of the restart and had Portugal on the backfoot as Mateo Kovacic picked up a loose ball and went through ​the defenders but ​his shot hit the side ⁠of the net not long before they opened the scoring.Nikola Vlasic thought he had Croatia's second but was ruled offside after poking the ball in before Portugal stormed back down the field where Rafael ​Leao drilled a shot from outside the area that slammed off the crossbar.Ronaldo nearly scored when he coolly flicked the ball over the goalkeeper Dominik Livakovic and into the net but was ruled offside.The Portugal captain finally got his moment in the 68th moment when he fired a penalty straight down the middle of the goal after Renato Veiga was pulled down in the area by Vlasic.