Spain's thrilling 5-3 extra-time win in the last-16 at Euro 2020 on Monday began as a nightmare for goalkeeper Unai Simon with a blunder that gifted Croatia a goal but ended in a dream finish as his point-blank save in extra time proved key to victory.

Spain looked in control when Simon failed to control Pedri's back pass in the 20th minute and watched helplessly as the ball bounced over his foot into the net to put Croatia 1-0 ahead. It was scored from 49 yards, the longest own-goal ever seen at a European Championship and the first from outside the box.

RELATED| EURO 2020: Spain beats Croatia 5-3 to advance to the quarterfinals

However, the 24-year-old Simon's team mates kept faith with their goalkeeper. "We have complete confidence in him," captain Sergio Busquets said.

"Unai has a very laid back mentality but he's ambitious at the same time. And I think he showed that in his reaction to the own goal with the saves he made. He was ultra secure after the goal," he added.

Simon -- who threw his shirt into the crowd after the match and was hugged by team mates -- has earned plaudits for his shot stopping but his a lack of composure on the ball has sparked criticism -- two traits on full display in the Croatia match.

His blunder put the three-time European champion on the back foot until Pablo Sarabia levelled for Spain, which seemed to be coasting to the last eight after Cesar Azpilicueta and Ferran Torres gave them a 3-1 lead before it conceded two late goals.

The Spaniards eventually triumphed in extra time. "Mistakes are part of football and when it's a keeper, everyone notices it more," said Mikel Oyarzabal who scored in the 103rd, three minutes after Alvaro Morata made it 4-3.

RELATED| Euro 2020: Luis Enrique hails Spain's team spirit after 'crazy' 5-3 win over Croatia

"Our confidence in Unai is unchanged. I've been involved in very few groups of players who feel as unified or as confident as this one," he added.

The chaotic finish to regulation time, when Mislav Orsic and Mario Pasalic scored to draw Croatia level, provided Simon with a chance to redeem his first-half error. With Croatia pushing forward and looking like it might take the lead, Simon made a superb sprawling save to deny Andrej Kramaric's point-blank shot early in extra time.

That save re-energised the Spaniards whose quick-fire double through Morata and Oyarzabal set up a quarterfinal with Switzerland in St Petersburg on Friday.

"This is football and these things happen," Busquets said. "But the most important thing is to pick yourself up, show a strong mentality, and I think both Unai and the whole team did that today," he added.