Paris Saint-Germain were on Wednesday pushed into second in Champions League Group H as a little-known rule sent Benfica top at the death.
The French outfit looked all but certain to qualify from Group H in first place but were pipped to the post by Benfica.
While PSG beat Juve 2-1 on the night, their Portuguese rivals overcame Maccabi Haifa 6-1 away from home, adding vital goals to their tally in the 88th and 92nd minutes.
This massive victory meant that both teams ended level on 14 points, sharing a goal difference of +9, having both won four games, drawn two and lost none.
They also drew those two matches with one another (1-1 on both occasions), meaning their head-to-head was level too.
With everything so tight, the group positions were ultimately decided by goals scored away from home, as per the official UEFA ruling.
PSG had managed six, but after their huge win in Israel, Benfica had racked up nine, so the latter qualified first in the most incredible circumstances.