Switzerland knocked world champions France out of Euro 2020 last 16, winning 5-4 on penalties on Monday with French star Kylian Mbappe missing the decisive spot-kick in the penalty shootout that followed a thrilling 3-3 draw in Bucharest.

Mario Gavranovic forced extra-time with a last-minute equaliser as Switzerland overturned a two-goal deficit before goalkeeper Yann Sommer saved from Mbappe in the shootout to book Switzerland a quarter-final clash against Spain.

Haris Seferovic had put Vladimir Petkovic’s Switzerland in a shock lead on 15 minutes but Hugo Lloris kept France in the game by saving a penalty from Ricardo Rodriguez early in the second half.

Karim Benzema, recalled to the France squad for the tournament after a five-and-a-half-year international exile, then struck a quick-fire double to put the Euro 2016 finalists back on track.

Paul Pogba’s sensational curling effort made it 3-1, but Switzerland forced extra time as Seferovic grabbed his second of the game before Gavranovic levelled in the final minute.

Switzerland converted all five of their penalties before Sommer dived to his right to turn away Mbappe’s kick, as the Swiss won a major tournament knockout tie for the first time in 83 years.

France coach Didier Deschamps controversially switched to a 3-4-1-2 formation designed to extract the best from his attacking trio of Benzema, Mbappe, and Antoine Griezmann, but it was instead Seferovic who gave the Swiss a surprise lead.

Steven Zuber used the space afforded by Rodriguez’s overlapping run, clipping in a left-wing cross that Seferovic headed past Lloris after rising all too easily above Clement Lenglet.

After a dismal first half, in which France failed to test Sommer, Deschamps ditched the experiment of three at the back, hauling off Lenglet and introducing Kingsley Coman while reverting to a more familiar 4-4-2.

But France were indebted to Lloris from sparing them from further trouble after a lung-busting run from Zuber eventually resulted in a penalty for the Swiss when he was brought down by Benjamin Pavard.

Argentine referee Fernando Rapallini immediately pointed to the spot following a VAR review, but Lloris flung himself to his right to claw away Rodriguez’s attempt — the seventh missed penalty of 15 taken at the tournament.

The momentum soon swung sharply in France’s favour as Benzema, scorer of both goals in the 2-2 draw with Portugal in the group phase, superbly dragged a pass from Mbappe into his stride, lifting over Sommer to level.

The Real Madrid striker headed France in front two minutes later when Griezmann’s dinked effort was turned away by Sommer but only to a waiting Benzema who headed in from point-blank range.

Pogba’s magnificent 25-yard strike had France on the cusp of the last eight, but Seferovic powered in a terrific delivery from substitute Kevin Mbabu with nine minutes left to give the Swiss hope.

Gavranovic then had a goal ruled out for offside, but there was no doubting his last-minute equaliser as he skipped past Presnel Kimpembe and drove low beyond Lloris.

Remarkably, Coman nearly won the game with the final kick, rattling the crossbar right at the end of injury time.

An ailing Benzema was withdrawn at the start of extra time for Olivier Giroud, moments before Sommer tipped over superbly to deny Pavard.

Pogba released Mbappe with a piercing pass through the Swiss defence but the Paris Saint-Germain forward sliced wide, with Sommer flying to his right to grasp Giroud’s header before his penalty heroics.