Spain overcame a remarkable Croatian challenge as they notched up a 5-3 extra-time victory in Copenhagen on Monday to set up a Euro 2020 quarter-final against either France or Switzerland, who are up next.

Croatia,  who were the runners-up at the 2018 World Cup, clawed back from 3-1 down in the 85th minute to force an additional half an hour in the last-16 tie.

But Alvaro Morata, who has faced a lot of criticism in recent days, slammed home to put Spain back in front in the 100th minute before Mikel Oyarzabal made it the highest-scoring European Championship match since the first game of the inaugural edition in 1960.

Spain had not won a major tournament knockout match since thrashing Italy in the Euro 2012 final but progress to a showdown with either the French or Switzerland on Friday that is set to be played in Saint Petersburg despite concerns about increasing coronavirus cases in Russia.

Spain should have been a goal ahead in the 16th minute when Koke was put clean through by an inch-perfect Pedri pass, but with the goal at his mercy the Atletico Madrid man could only shoot straight at Livakovic.

Then three minutes later Morata, who was selected by Luis Enrique despite poor form in the group stage which led to abuse by Spain fans of him and his family, saw his point-blank range header blocked by Domagoj Vida.

Almost immediately afterwards disaster struck for Spain through Pedri’s own goal, which came after goalkeeper Unai Simon allowed his bobbling backpass to bounce over his foot and gently roll into the net.

From nowhere Croatia all of a sudden had their tails up and Nikola Vlasic and Mateo Kovacic both fired off efforts that troubled Simon even though they didn’t hit the target.

Spain were rattled by the opening goal but quickly recovered to carry on dominating the ball and got a deserved leveller seven minutes before the breakthrough the enterprising Sarabia, who lashed home on the rebound after Jose Gaya’s shot was well saved by Croatia goalkeeper Dominik Livakovic.

The second half got off to a slower start but Croatia continued to offer little and Spain had the lead in the 57th minute through Azpilicueta, who couldn’t miss with his close-range header from Ferran Torres’ well-flighted cross after a burst into the area from the impressive Pedri.

Simon made up for his earlier howler in the 67th minute when he got down low very quickly to keep out Josko Gvardiol’s close-range shot at his near post.

And with 13 minutes remaining Torres put Spain two ahead with a classy piece of finishing.

The Manchester City attacker perfectly read the flight of substitute Pau Torres’ raking long pass from near the halfway line to the edge of Croatia’s area, and he easily swept past Gvardiol before slotting home a calm finish.

With the match looking as good as over Orsic sparked the large Croatian support in the Parken back to life when he prodded home following confusion in the Spain penalty area.

And then with time running out for Croatia the stands erupted as Pasalic met fellow substitute Orsic’s cross to take a match which had previously looked dead to extra time.

It was Croatia who were initially the more threatening after the restart but Morata, who had up to then looked lost upfront, put Spain back in front nine minutes into extra time when he deftly controlled Dani Olmo’s cross and lashed a rocket of a shot past Livakovic.

Oyarzabal then finally made sure of Spain’s passage into the quarters three minutes later thanks to another superb Olmo cross which allowed the Real Sociedad playmaker to rattle home a close-range finish and definitively put the tie to bed.