Edinson Cavani scored late as Paris St-Germain booked their place in the last 16 of the Champions League with a 2-1 win over Group C rivals Olympiakos.
Gareth Bale struck as Real Madrid, who had Sergio Ramos sent off, sealed top spot in Group B with a 4-1 win over Turkish side Galatasaray.
Bayern Munich beat CSKA Moscow 3-1 to lead Group D by three points.
They will fight it out with Manchester City in the last round for top spot.
Manchester United sealed their place in the knockout stages of the Champions League with a 5-0 win at Bayer Leverkusen, who are in second spot in the Bundesliga.
United boss David Moyes described the performance as the "best yet" of his time in charge of the Premier League champions.
They play Shakhtar Donetsk, who defeated Real Sociedad 4-0, in their final group match. The Ukraine club need victory at Old Trafford to be sure of their place in the next round.
Leverkusen have seven points, one fewer than Shakhtar - they travel to San Sebastian.
Real Madrid were as impressive as Manchester United, recording a convincing win over Galatasaray while playing with 10 men for 65 minutes after defender Ramos was sent off for pulling down Umut Bulut.
World-record signing Bale scored the opener with a swerving free-kick as his side secured top spot in the group.
Chile midfielder Arturo Vidal scored a hat-trick as Juventus put themselves in a great position to finish second with a 3-1 win over Copenhagen.
Juventus have six points, two more than Galatasaray, who they face in the final fixture.
Cavani scored a stoppage-time winner as 10-man Paris St-Germain beat Olympiakos to ensure progression and top spot in the group.
Sweden striker Zlatan Ibrahimovic opened the scoring with a tap-in on his 100th Champions League appearance. Italian Marco Verratti was sent off for a second bookable offence early in the second half.
Benfica joined the second-placed Greek side on seven points with a dramatic 3-2 win at Anderlecht - Spanish striker Rodrigo scored in the 90th minute.
The Portuguese side host PSG in the final match, while Olympiakos are at home to Anderlecht.
Bayern Munich all but cemented top spot in the group with a brilliant 3-1 win at CSKA Moscow.
Arjen Robben, Mario Gotze and Thomas Muller, with a penalty, scored for the holders, while Keisuke Honda grabbed a consolation from the spot for the Russian club.
Manchester City will have to defeat Bayern by three goals in Munich to top the group, although manager Manuel Pellegrini will be pleased with his side's 4-2 victory over Czech club Viktoria Plzen.
CSKA will take third place and a spot in the Europa League if they secure at least a draw at Plzen.
Read more on the permutations for the final round of Champions League group matches.