The two times Euro champion were pushed into the corner but ultimately overcame their opponent.
Spain has cruised through to the next round of EURO 2020. It was a dramatic and scintillating match that forced fans to the edge of their seats.
The former champions went a goal down just 20 minutes after Pedri's back pass to goalkeeper Unai Simon, who miscontrols it, which ends up back in the net. Pablo Sarabia scored in the 38th minute to level Spain on the scoreline in the first half.
Croatia looked lackluster in the first half and failed to register any shots on target. Spain dominated ball possession throughout the match and took the lead after Cesar Azpillicueta scored his maiden international goal just before the hour mark.
Ferran Torres put the La Roja in the driving seat after doubling the lead in the 76th minute. It looked like the end for Zlatko Dalic's men in the competition, but Mislav Orsic gave them hope after scoring five minutes from the normal time.
And then, Mario Pasalic sent everyone into a frenzy after he headed the ball from Orsic cross in the 92nd minute. The comeback was complete taking the game into extra time, and it gave Croatia confidence that they now could win the match.
Mario Pasalic scored in the stoppage time and sent fans into ecstasy.
However, in the 10th minute of the first half of the extra time, Alvaro Morata fired the ball in the net to once again put Spain in the lead. Three minutes later, Substitute Mikel Oyarzbal scored to give Spain a deep sigh of relief.
Spain scored two in the first half of the extra time.
In the second half of extra time, Croatia could not put much pressure on their opponent, and the match ended.