Champions League debutants Atalanta reached the knockout stages with victory at Shakhtar Donetsk after recovering from losing their first three games.
The Serie A side only had one point after four games – including a 4-0 and 5-1 defeat – but wins over Dinamo Zagreb and Shakhtar have taken them through behind Manchester City.
Timothy Castagne, Mario Pasalic and Robin Gosens scored in the second half, as Shakhtar ended with 10 men following Dodo’s red card for violent conduct.
Castagne’s goal was initially ruled out for offside against Alejandro Gomez, who crossed the ball, but was allowed after a long video assistant referee delay.
The hosts – who would have gone through with a point – had Dodo harshly sent off for violent contact after brushing his hand against the face of Remo Freuler.
Pasalic poked in Ruslan Malinovskiy’s free-kick from close range and Gosens hooked home in the final minute after a defensive error.
Atalanta – who would have been eliminated had Dinamo Zagreb beaten Manchester City – are the first debutants to reach the last 16 since Leicester City in 2016-17.
Elsewhere Manchester City forward Gabriel Jesus says he has to “keep scoring” after his hat-trick inspired the Blues to come from behind to win their final Champions League Group C game at Dinamo Zagreb.
The Brazil forward, 22, who is spearheading City’s attack with Sergio Aguero out injured, has now scored five goals in his last five starts for the club.
And his form is likely to be key for City, who are third in the Premier League, 14 points behind leaders Liverpool.
“Now the goals are coming so I’m so happy but I cannot stop – I have to keep scoring,” Jesus said.
“I have to do my job. My job is to score goals and help the team, without the ball and with the ball. Last month, I was not scoring and I felt so bad because I have to score and help my team-mates.”
City, who qualified prior to their trip to Croatia, finished top of Group C, with Atalanta qualifying in second after their 3-0 win at Shakhtar Donetsk.
Dani Olmo had opened the scoring for the hosts, with a sparkling volley from Damian Kadzior’s right-wing cross which found the top corner.
But Pep Guardiola’s side dominated possession throughout and levelled before the break, with Jesus heading a Riyad Mahrez cross into the top left corner.
Jesus then put City ahead early in the second half, placing an effort into the bottom right corner after a one-two with Phil Foden and some neat footwork.
Meanwhile Ryan Sessegnon marked his first Tottenham start with a goal but could not prevent Spurs from losing 3-1 to Bayern Munich in their final Champions League group game.
Both sides had already qualified for the last 16, with Bayern progressing as Group B winners and Tottenham going through as runners-up, and consequently they made numerous changes for Wednesday’s encounter at the Allianz Arena.
Bayern beat Spurs 7-2 in their first meeting in this season’s competition at the Tottenham Hotspur Stadium and took an early lead through Kingsley Coman.
Spurs hit back soon after when Sessegnon showed great composure to bring a pass under control inside the area and rifle a powerful finish beyond Manuel Neuer.
Thomas Muller, on as a first-half substitute after Coman picked up an injury, then struck just before the break when he tapped in after Alphonso Davies had hit the post.
Philippe Coutinho went close to scoring a spectacular third for the hosts but his fierce drive from distance bounced off the underside of the crossbar before being cleared.
The former Liverpool forward got on the scoresheet in the second half when he curled into the bottom corner from the edge of the area.
Spurs will face one of Barcelona, Juventus, Paris St-Germain, Valencia or RB Leipzig in the last 16, with the draw on Monday.