Portugal and Spain could not be separated in what was billed as the potential "game of the tournament."
The second half was a bit of a slow start, with Portugal penned into their own half and Spain trying to find a way through.
Their defensive rearguard was broken down in the 55th minute. Busquets put the ball across the box to Costa for Spain's equaliser and his second of the game, scoring with a closed-ranged finish.
Spain then went in front through Nacho, who conceded a penalty earlier on. He hit a powerful strike which cannoned off the post and in as they lead for the first time.
Portugal were finding it hard to get back into the game as Spain enjoyed a spell of possession.
Cristiano Ronaldo levelled things up with five minutes to go. Pique fouled him and he hit a powerful free-kick into the goal of De Gea, who was rooted to the spot.
Here are the key takeaways from the match:
Iberian Derby lives up to billing
An early penalty by Ronaldo set the pace of the high-energy game. The Derby between the two sides was exactly what it was meant to be, resulting in a six-goal thriller.
Before the game, news broke of Ronaldo accepting an €18.8 million fine for tax evasion. However, he appeared unaffected by the financial drama, scoring a superb hat-trick for his country.
Technology comes into the equation
Three times in the game, both goalline technology and VAR were used — for Ronaldo's penalty, Spain's goal after an apparent foul on Pepe and Isco's shot that hit the crossbar.
An unlikely mistake from de Gea
Spain goalkeeper David de Gea made a massive error for Portugal's second. He allowed Ronaldo's shot to go through his legs in what is a routine save for any goalkeeper.
Iniesta shows class
Andreas Iniesta showed that he still has it. A miss to Barcelona, but he still has what it takes to play for the Spanish national team.
Costa steps up
He didn't register a shot on target in the last World Cup, but Atletico Madrid striker Diego Costa stood up to the plate this evening, with his two goals.
Look back at how the match unfolded in the blog below: