PSV Eindhoven secured their place in the knockout stages of the Champions League with a late 2-1 win against Group B's bottom club CSKA Moscow.
Luuk de Jong and Davy Propper struck inside the final 12 minutes of a nervy contest after Sergei Ignashevich's 76th-minute penalty had the home fans fearing the worst.
Philip Cocu's side had needed to win to progress and, even then, they were indebted to Wolfsburg's 3-2 win over Manchester United to allow them to stay alive in Europe's premier club competition.
United will instead slip into the Europa League while CSKA's European adventure this season is over.
PSV maintained an unenviable record of failing to score in the first half of a Champions League match so far this campaign, although at 0-0 and with United behind in Germany the night was going their way.
Their first-half efforts were undermined by 22-year-old striker Jurgen Locadia struggling to keep on the right side of the offside flag while Luuk de Jong headed narrowly wide after five minutes.
CSKA looked to hit their hosts on the counter-attack and came close to the opener on 24 minutes when Seydou Doumbia got into the heart of the PSV defence but was tackled by Jeffrey Bruma before he could get his shot away.
The Russian club grew in strength towards the end of the first half and Zoran Tosic bent a free-kick towards the top corner only to see Jeroen Zoet palm it away.
A tense second half followed and it appeared PSV's hopes of progressing were ended when they gave away a penalty 15 minutes from the end.
Andres Guardado was whistled for bringing Tosic down in the box. Ignashevich's stuttering run then sent the goalkeeper the wrong way and he calmly slid the ball into the back of the net put the visitors into the lead.
CSKA's advantage lasted just a minute as they failed to clear a free-kick from the right and were punished by De Jong's opportunism.
The PSV striker was played onside when the CSKA defence was slow to push out and he was left with all the time he needed to take the ball down and score past an exposed Igor Akinfeev.
Propper then struck the match-winner on 85 minutes with a world-class finish.
A cross into the area ricocheted off substitute Steven Bergwijn and sat up perfectly for Propper who smashed a low drive into the bottom-left corner to leave a diving Akinfeev with no chance of making the save.
Only moments earlier Manchester United conceded a third goal against Wolfsburg and the celebrations could begin in Eindhoven.