Portugal's Cristiano Ronaldo curled in a sizzling late free kick to strike the first hat-trick of the 2018 World Cup and grab his side a point in a thrilling 3-3 draw with Spain as the Group B blockbuster lived up to the hype.

In what was by far the best game of the tournament so far, Spain forward Diego Costa notched a double before Nacho put them 3-2 ahead with a brilliant third only for Ronaldo to snatch a point.

Ronaldo became the fourth player to score in four World Cups after Uwe Seeler, Pele and Miroslav Klose. He had also scored in the last four European Championship tournaments.

Spain were still reeling from the remarkable decision to fire coach Julen Lopetegui on Wednesday, after the federation said he had negotiated a contract to take over at Real Madrid without their knowledge and replaced him with Fernando Hierro.

The match got off to an explosive start when Ronaldo beat Nacho on the left of the box with a stepover, was tripped and converted the penalty himself in emphatic style after four minutes.

Costa equalised in the 24th as he latched onto a long ball forward by Sergio Busquets, bundled off a challenge from Pepe, slipped through two defenders and slotted his shot past Rui Patricio.

The goal was confirmed after a review by the video assistant referee (VAR), being used at the World Cup for the first time, for a possible foul on Pepe.

But, just as Portugal seemed to be holding their collective breath for the half-time break, the direction of the contest was turned on its head.

Ronaldo tried his luck from a central position 20 yards out and his number came up, De Gea letting the low drive to slip his grasp in a truly desperate moment for the Manchester United goalkeeper.

But the error was not fatal as Silva floated a 54th-minute free-kick to the back post that Sergio Busquets nodded down and Costa finished from inside the six-yard box.

Four minutes later Nacho's sweet drive cannoned in off a post and that was the signal for Spain to take control. A fourth goal seemed likely.

Incredibly, there was more drama to come as Portugal won a free kick about 20 metres out in the 88th minute.

Ronaldo rolled up his shorts, stepped forward and curled the ball around the wall into the top corner to set off delirious celebrations amongst the Portugal players and fans. 

We need your consent to load this rte-player contentWe use rte-player to manage extra content that can set cookies on your device and collect data about your activity. Please review their details and accept them to load the content.Manage Preferences

You can follow the FIFA World Cup  all the way with RTÉ. Live blogs of every game on RTÉ.ie and the News Now App, with 56 games live on RTÉ television and all 64 games available on the RTÉ Player.