Manchester United crashed out of the Champions League with a 3-2 defeat at Wolfsburg on Tuesday.
Anthony Martial put United ahead when he beat a high offside trap to corral a Juan Mata through ball and finish at the far post in the 10th minute.
But United were only ahead for two minutes when Naldo flicked on Ricardo Rodriguez's free kick on the volley to beat David De Gea and level the score at 1-1.
Wolfsburg took the lead through a fine piece of play on 29 minutes, Julian Draxler playing a one-two to break into the United box before squaring for Vieirinha to tap into an open net.
United were given a lifeline when Josuha Guilavogui headed into his own net in the 82nd minute, but again the Premier League side were undone two minutes later when lacklustre defending allowed Naldo to score following a corner.
Wolfsburg won Group B while United settle for a spot in the Europa League.
PSV rallied to defeat CSKA Moscow 2-1 to finish runners-up and move on ahead of Man United.
Sergei Ignashevich provided the Russian side a 76th-minute lead, but Luuk de Jong equalised two minutes later before Davy Proepper found the winner four minutes from time.
Cristiano Ronaldo scored four times and Karim Benzema added three goals -- the first time two players had scored hat tricks in the same Champions League game -- as Group A winners Real Madrid routed Malmo 8-0, tying a group-stage record margin set by Liverpool in 2007.
Benzema opened the scoring in the 12th minute, pouncing on a rebound after Tobias Sana had cleared the ball off the line. The Frenchman then rose highest to head home a cross from Ronaldo and double Real's advantage in the 24th minute.
Ronaldo scored from a free kick for the first time this season in the 39th minute, his shot bouncing in front of Malmo keeper Johan Wiland.
He had a chance to add to his tally in the first half but somehow blazed over the bar from 10 yards. But Ronaldo then scored twice in the opening five minutes of the first half, first mopping up a blocked effort from close range before again beating Wiland with a low shot through traffic.
Ronaldo's fourth came in the 59th minute as Isco squared for him to finish in the centre of the box.
Mateo Kovacic added a seventh goal in the 70th minute from a rebound, and Benzema skipped through the defence to complete his hat trick soon afterwards.
Paris Saint-Germain had already secured the runners-up spot in Group A and defeated Shakhtar Donetsk 2-0.
Lucas Moura provided the opening goal with a powerful shot from the edge of the box in the 57th minute before Zlatan Ibrahimovic added a second late on.
With just three points in the group stage, Shakhtar still finished third and secured a spot in the Europa League thanks to their head-to-head record over Malmo.
Raheem Sterling scored two and set up another goal as Manchester City produced a late surge to beat Borussia Monchengladbach 4-2 and top Group D.
Man City took the lead in the 16th minute as Sterling played an intelligent backheel to put David Silva through on goal, and he slammed an effort into the top corner.
Gladbach were level within a couple of minutes as Fabian Johnson played a ball across the box and Julian Korb made no mistake with the first-time shot.
The Bundesliga side deservedly turned the game on its head three minutes before half-time as Raffael reacted superbly to a loose ball in the box and beat Joe Hart.
City dominated the second half, laying siege to the Gladbach goal but they were denied by heroics from goalkeeper Yann Sommer. But he couldn't keep out Sterling when he was found eight yards out in the 80th minute.
And 60 seconds later City had the lead as they broke through in numbers, Wilfried Bony laying the ball off for Sterling to shape his body and curl into the corner of the net. Any doubt about the result was removed in the 85th minute as Bony scored at the second attempt after his initial effort hit a defender.
Sevilla defeated Group D runners-up Juventus 1-0 to earn a spot in the Europa League.
Fernando Llorente's goal in the 65th minute was the only scoring, and the Italian champions failed to secure the top spot when City rallied to beat Gladbach.
Luciano Vietto had a goal and an assist to help Atletico Madrid win Group C with a 2-1 victory at Benfica.
Vietto was played through and squared to Saul Niguez to score in the 33rd minute, then scored himself in the 55th minute by getting on the end of a low cross to tap in at the near post.
Konstantinos Mitroglou got one back with a shot off the post for Benfica, who advanced as group runners-up.
Galatasaray drew 1-1 with FC Astana to secure their spot in the Europa League.
Selcuk Inan scored for the Turkish giants in the 64th minute to cancel out Patrick Twumasi's opener moments earlier.