Bordeaux booked their place in the last eight of the Champions League with a 2-1 victory over Olympiacos in an eventful game in France which both sides ended with just 10 men on the field.
Leading by a solitary goal from the first leg, the hosts appeared to be cruising into the quarter-finals when Yoann Gourcuff curled in a free-kick with just five minutes gone.
Their positioned was strengthened further when Olympiacos striker Matt Derbyshire was sent off on the hour after picking up two yellow cards in the space of five minutes.
However, Konstantinos Mitroglou silenced the home fans with a fine strike moments later and Bordeaux's numerical advantage was wiped away when captain Alou Diarra was sent off on 68 minutes.
The French champions survived an Olympiacos onslaught, though, and sealed their win with a late goal from Marouane Chamakh.
Bordeaux couldn’t have hoped for a better start, former Milan midfielder Gourcuff catching out Antonios Nikopolidis in the Olympiacos goal with a superb free-kick from wide on the left-hand side.
Gourcuff very nearly repeated the feat just before the interval but his stunning 45-yard effort came back off the angle of crossbar and post.
The France midfielder was running the show and Olympiacos’ frustration boiled over when Derbyshire, just moments after being booked for a dive, saw yellow again, and then red, for a late lunge on Jaroslav Plasil.
However, the Greeks got themselves right back into the tie with out a goal out of nowhere in the 65th minute, Mitrogolou beating Cedric Carrasso with a superb strike into the top corner after a quick throw-in.
The momentum shifted even more significantly when Diarra saw red for a studs-up challenge moments later.
However, despite their best efforts, Olympiacos couldn’t find the goal which would have seen them progress on away goals and it was Bordeaux who found a winner with just over two minutes to go, Moroccan striker Chamakh rising superbly to head home Benoît Trémoulinas delightful cross to the far post.