Artem Dovbyk netted a last-gasp winner as Ukraine booked their place in the quarter-finals of Euro 2020 with a thrilling 2-1 extra-time victory over Sweden at Hampden Park.
Ukraine broke the deadlock when a passing move just before the half hour found Oleksandr Zinchenko at the back post and his rasping half-volley was too strong for Robin Olsen.
Sweden equalised on the stroke of half-time through Emil Forsberg's deflected effort from distance and the striker twice hit the woodwork after the break.
Marcus Danielson was sent off in extra time and Ukraine made the extra man count when Zinchenko's cross was headed in from close range by substitute Dovbyk to set up a last-eight tie with England.
Sweden began with the greater intensity but it was Ukraine who carved out the first meaningful effort on goal when Roman Yaremchuk's low shot was kept out by the diving Olsen.
Alexander Isak dragged an effort wide of the post for Sweden before a slick Ukraine interchange culminated in Andriy Yarmolenko's deft cross with the outside of his boot which Zinchenko crisply finished.
Sweden almost hit back instantly when Sebastian Larsson's opportunistic curling free-kick from long distance had Georgi Bushchan scrambling across goal.
The leveller soon followed, Forsberg showing quick feet to create a shooting opportunity from outside the box as his strike took a defection off Illia Zabarnyi and flew beyond Bushchan.
Both sides struck the woodwork early in an open start to the second half as Larsson and Forsberg grazed the post either side of Serhiy Sydorchuk's shot which rebounded off it.
Bushchan produced a superb diving save to keep out a Dejan Kulusevski curling shot which seemed destined for the top corner before Forsberg jinked inside and bent another effort against the crossbar.
Kulusevski had a chance for Sweden at the end of normal time when he controlled a long ball but his angled shot was kept out by a last-ditch block from Oleksandr Karavaev.
Sweden's Danielson was sent off in extra time following a VAR review for a dangerous high tackle on Artem Besedin which left the Ukraine player unable to play any further part.
Spot-kicks loomed but Dovbyk popped up with the winner, heading in Zinchenko's cross from just outside the six-yard box in injury time at the end of 120 minutes.
What does it mean? Shevchenko's men march on
Ukraine came from behind to win 2-1 against Sweden in the last meeting between the sides at Euro 2012 thanks to a brace from current manager Andriy Shevchenko.
Shevchenko kicked every ball in the dugout this time as his side progressed with two goals of quality, which owed much to the open passing style he has favoured since taking charge.
How much this game will have taken out of Ukraine remains to be seen but they will be no pushovers for England in the last eight.
Zinchenko inspires at the key moment
Zinchenko became Ukraine's youngest scorer at the Euros (24 years and 196 days), while only Andriy Rusol has netted at a younger age for them at a major tournament (23 years 154 days versus Saudi Arabia in 2006). His youthful energy helped him get up the pitch and supply the winner late on.
Danielson's dismissal drains Sweden
Defender Danielson became the fourth player to receive a red card in extra time of a European Championship match following his reckless lunge, and first since Nuno Gomes for Portugal against France in 2000. The life drained out of Sweden as they played extra time with 10 men and Dovbyk punished them with his first goal for Ukraine.
Ukraine face England in the quarter-finals in Rome on Saturday with the winners of that tie playing the victor of Denmark versus Czech Republic in the semi-finals.