Media caption,

Highlights: Spain 2-1 Germany

Spain kept themselves on course to win a fourth European Championship as Mikel Merino's 119th-minute goal sent them into the semi-finals and eliminated hosts Germany following a pulsating encounter at Stuttgart Arena.

This was the most anticipated match of the tournament so far as it put together the resurgent home nation against arguably the best-performing side to date at Euro 2024 - and it certainly lived up to expectation.

Played with aggression, tension and drama the contest barely let those watching pause for breath from the moment Dani Olmo gave Spain the lead six minutes into the second half.

The substitute side-footed home a cross from 16-year-old star Lamine Yamal - his third assist of the Euros - and his strike opened up a game that had been played with caution until then.

Germany hit the post through their own substitute Niclas Fullkrug, but equalised in the final minute of normal time when Florian Wirtz sent a thunderous strike in off the post to send the home fans wild.

Mikel Oyarzabal and Wirtz then sent efforts agonisingly wide in extra time, Spain goalkeeper Unai Simon superbly clawed away a Fullkrug header while Germany had penalty appeals dismissed after the ball struck Marc Cucurella's hand in the box.

But with seconds remaining of a thrilling tie, Real Sociedad forward Merino - who spent the 2017-18 season at Newcastle United - thumped home a header to send Spain into the semi-finals, where they will face France in Munich on Tuesday, 9 July.

Full-back Dani Carvajal was sent off just before the end for a second yellow card, but it was not enough to spoil the Spanish celebrations as fans and players greeted the final whistle with joy and relief.

After disappointing performances at recent major international tournaments, this Germany side impressed, with exciting young talent like Wirtz and Jamal Musiala providing optimism for the future.

But that future will be one without the legendary Toni Kroos, with the 34-year-old having said this tournament would be his last as he retires from football.

Image source, Getty Images
Image caption,

Both Spain and Germany have won the European Championship three times

Strength in depth sees Spain through

Media caption,

Merino's 119th-minute header restores Spain's lead

This victory for Spain meant they remain unbeaten at Euro 2024 as they look to win the championship for the first time since 2012.

But this was the hardest they have had to work in the tournament, with Merino's dramatic last-minute heroics ensuring they avoided the lottery of penalties.

Spain are arguably the most complete side at Euro 2024 and when Olmo opened the scoring it looked like they would have too much for Germany.

But their opponents pressed hard and that unsettled Spain, who rode their luck before Wirtz levelled.

Key to this victory was the contribution of their players from the bench and, with suspensions for Carvajal and Robin le Normand and the extent of Pedri's early injury uncertain, that will serve Spain well in their bid to reach the final.

Germany out, but provide optimism for future

Media caption,

Wirtz scores late for Germany to force extra time

This was a cruel blow for Germany, whose fans inside the Stuttgart Arena really believed their side had enough to get over the line.

But when the dust settles they should reflect on a run that has provided renewed hope in their national team.

They had struggled at recent tournaments, going out at the group stage in the last two World Cups and, prior to Euro 2024, there was not an overriding sense they would be title contenders here.

But that belief grew as the tournament went on and they can still take heart from how far their exciting young side pushed a strong Spain team.

However, their exit meant no host nation has won a Euros since France triumphed back in 1984.

Player of the match

Number: 10 Dani Olmo
Average rating 7.86
Number: 10 Dani Olmo
Average Rating: 7.86
Number: 19 Lamine Yamal
Average Rating: 7.47
Number: 16 Rodri
Average Rating: 7.23
Number: 17 Nico Williams
Average Rating: 7.14
Number: 6 Mikel Merino
Average Rating: 7.04
Number: 8 Fabián Ruiz
Average Rating: 6.74
Number: 24 Marc Cucurella
Average Rating: 6.56
Number: 14 Aymeric Laporte
Average Rating: 6.53
Number: 23 Unai Simón
Average Rating: 6.44
Number: 7 Álvaro Morata
Average Rating: 6.38
Number: 2 Dani Carvajal
Average Rating: 6.37
Number: 21 Mikel Oyarzabal
Average Rating: 6.34
Number: 4 Nacho
Average Rating: 6.21
Number: 11 Ferran Torres
Average Rating: 6.19
Number: 20 Pedri
Average Rating: 6.03
Number: 3 Robin Le Normand
Average Rating: 6.03
Number: 9 Joselu
Average Rating: 5.92

After the opportunity to rate players has closed, the score displayed represents the average from all the submissions by BBC Sport users.