GLASGOW, Scotland — Ukraine had reached the round of 16 at the European Championship with two losses and the worst record of the advancing teams.
And now the quarterfinals, too.
Ukraine eliminated previously unbeaten Sweden 2-1 on Tuesday with a goal in stoppage time at the end of extra time from a player who was left on the bench for the entire group stage. Substitute Artem Dovbyk stooped low to guide a header from Oleksandr Zinchenko's cross past goalkeeper Robin Olsen.
It was the 24-year-old forward's first goal for the national team.
Ukraine's greatest ever forward, current coach Andriy Shevchenko, ran down the sideline to celebrate with his players, who will now head to Rome to face England on Saturday.
Zinchenko also scored on a day when his Manchester City teammate Raheem Sterling got one in England's 2-0 win over Germany. Zinchenko gave Ukraine the lead in the 27th minute when he rifled in a low shot set up by a crafty pass from captain Andriy Yarmolenko.
Emil Forsberg's deflected shot from outside the area in the 43rd minute equalized for Sweden. It was his fourth goal at Euro 2020, but a tournament lead-tying fifth eluded him in the second half despite curling shots off the post and the crossbar.
"It's a very bitter defeat," Sweden coach Janne Andersson said. "In the second half we had four really great chances. It felt like we would score eventually."
Andersson cited the momentum shift in extra time when Sweden defender Marcus Danielson was sent off in the 98th minute for following through on a challenge with a raised boot on substitute Artem Besedin.
The game lost all rhythm and flow in scrappy extra time periods littered with fouls, injuries and an argument between the two coaches.
"It was a really hard game," Shevchenko said. "Everyone understood that the prize at the end was great. We needed to be strong and the players showed it today."
Andersson said he confronted Shevchenko because "I felt like they were diving a bit toward the end."
Just to get to Glasgow, the Ukrainians had needed a favor from Sweden to advance because they lost two group games and had a negative goal difference. After losing to Austria last week, Ukraine would have been out if Poland had beaten Sweden two days later. Sweden won that game 3-2 with Forsberg scoring twice.
Neither team had ever won a knockout game at a European Championship in a combined eight previous tournaments. Both often-cautious teams played more freely in a wide-open 90 minutes, trying to seize a chance for a deep run in the arguably weaker half of the draw.
The winner between Ukraine and England will play Denmark or Czech Republic in the semifinals.
Ukraine's key creator had been Yarmolenko, who plays in England for West Ham. To set up Zinchenko's goal, Yarmolenko used the outside of his favored left foot to drift a curling pass across seven defenders toward their blind side in the penalty area.
After scoring with a first-time shot, Zinchenko ran away with a finger to his lips in a gesture he said was telling critics to be quiet.
"In the first three games we received a lot of criticism, which I think we deserved," he said through a translator. "I showed that they need to support us."
Yarmolenko looked exhausted long before he was taken off for the final period of extra time — making way for Dovbyk to come on.