Portugal's irrepressible captain Cristiano Ronaldo scored a stunning late free kick to complete a World Cup hat-trick and rescue a dramatic 3-3 draw in an enthralling Group B match against neighbours Spain on Friday.
In 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.
Spain appeared to be on top as Isco rifled a shot against the bar, only for Ronaldo to strike again one minute before halftime with a low shot which hit goalkeeper David De Gea's hand and slipped agonisingly into the net.
Costa levelled from close range 10 minutes after the break and Spain went ahead for the first time with a remarkable strike from Nacho, who met the ball on the volley at an awkward height and sent an inswinging shot in off the post.
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.