Meanwhile, Chelsea also confirmed their qualification, with an impressive 4-0 win over Juventus
Managerless Manchester United booked their place in the knockout stage of the Champions League with a 2-0 win at Villarreal.
Caretaker boss Michael Carrick took charge at El Madrigal following the departure of Ole Gunnar Solskjaer, who was dismissed in the wake of Saturday’s 4-1 Premier League defeat to Watford.
United were indebted to goalkeeper David De Gea for some fine saves before they eventually broke the deadlock with 12 minutes left though Cristiano Ronaldo’s instinctive lob from the edge of the penalty area.
Jadon Sancho added a second during stoppage time, crashing the ball in off the crossbar after a swift counter-attack for his first United goal.
The victory put United through to the knockout stage with a game to spare.
Elsewhere in the group, Atalanta drew 3-3 at Swiss side Young Boys.
The Italians took the lead through Duvan Zapata in the 10th minute, but Theoson Siebatcheu headed an equaliser from a corner shortly before the break.
Jose Luis Palomino fired Atalanta back in front six minutes into the second half, only for Vincent Sierro to make it 2-2 with 10 minutes left.
A spectacular strike from Silvan Hefti had the hosts in front, but Atalanta substitute Luis Muriel clipped in a fine free-kick with his first touch after coming on to rescue a point.
Holders Chelsea confirmed their qualification for the last 16 with an impressive 4-0 win over Juventus in Group H at Stamford Bridge.
Trevoh Chalobah fired the Blues ahead in the 24th minute, the goal given after a VAR review for a possible handball by Antonio Rudiger in the build-up.
Chelsea then struck twice in the space of three second-half minutes through Reece James (55) and Callum Hudson-Odoi (58) before substitute Timo Werner added another in stoppage-time to put the champions top.
The result, though, was somewhat overshadowed by injuries to midfielder Ngolo Kante and England defender Ben Chilwell.
Malmo and Zenit St Petersburg drew 1-1 in Sweden.
Soren Rieks put the hosts in front midway through the first half before Artem Dzyuba saw his penalty saved in the 52nd minute and then had a goal ruled out by VAR for offside on the hour.
With four minutes left, Dmitri Chistyakov was sent off for a second caution, but Yaroslav Rakitsky kept his cool to slot in a stoppage-time penalty after this time the VAR review went in the Russians’ favour.
Barcelona missed the chance to secure second place in Group E behind Bayern Munich as they were held to a goalless draw at home by Benfica.
New boss Xavi thought his side had scored a late winner through Ronald Araujo’s volley, only for the goal to be ruled out for offside.
In stoppage time, Benfica spurned a great chance when Haris Seferovic shot wide after breaking clear on goal.
Earlier, Robert Lewandowski maintained his impressive European scoring run with an acrobatic over-head kick as Bayern Munich won 2-1 at Dynamo Kyiv to cement their place at the top of the group.
The Poland striker found the net in a ninth successive Champions League match when he spectacularly hooked the ball past Georgi Bushchan in the 14th minute.
Shortly before half-time, Kingsley Coman added a second for the Bundesliga leaders, missing five players after they were in close contact with someone who has tested positive for Covid-19.
Dynamo substitute Denys Harmash reduced the deficit with 20 minute left, but there was no was no grandstand finale in the snow.
In Group G, Jonathan David’s first-half goal was enough to give Lille a 1-0 home win over RB Salzburg.
Victory moved the French club a point clear at the top.
Sevilla beat Wolfsburg 2-0 with an early header from Joan Jordan and Rafa Mir’s stoppage-time strike to close within a point of the Austrians, as qualification is set to go to the final round of fixtures.