Manchester United booked their place in the Champions League last 16 as Cristiano Ronaldo scored in a 2-0 victory at Villarreal on Tuesday, while holders Chelsea also reached the knockout phase by thumping Juventus.
Three-time European champions United went into their first game since sacking Ole Gunnar Solskjaer at the weekend needing a win to confirm a top-two finish in Group F.
But they were under massive pressure as defeat would have left their fate out of their own hands.
David de Gea made two crucial saves and United, with Michael Carrick in caretaker charge, took advantage through Ronaldo’s 78th-minute lob.
Jadon Sancho, so often a peripheral figure since his big-money move from Borussia Dortmund in the close-season, capped a fine individual display with his first goal for the club late on.
Ronaldo’s goal was the 799th of his career, his 140th in the Champions League and his sixth in the competition this season.
The other qualification spot in the group remains up for grabs after Young Boys and Atalanta played out a thrilling 3-3 draw in Bern.
Atalanta face a winner-takes-all match against Villarreal in Bergamo next month.
Chelsea romped into the last 16 and to the top of Group H with an impressive 4-0 thrashing of Juventus at Stamford Bridge.
Thomas Tuchel’s men knew that qualification would be secured if they could avoid defeat or if Zenit Saint Petersburg failed to beat Malmo.
The Blues dominated the early stages and took the lead through young defender Trevoh Chalobah’s third goal of the season.
It was a defender who doubled Chelsea’s lead in the 56th minute.
England right-back Reece James hammered a fine volley into the bottom corner to net for the fifth time already this term. Chelsea grabbed their third goal less than two minutes later, Ruben Loftus-Cheek prodding the ball to Hudson-Odoi, who smashed home from close range.
There was still time for Timo Werner, making his first appearance since an injury layoff, to come off the bench and score in added time.
In Group G, Lille made Salzburg wait to reach the last 16 as Jonathan David scored a first-half winner in a 1-0 victory in France.
All four teams in the group can still go through, after Sevilla saw off Wolfsburg 2-0.