Krepin Diatta scored a dramatic late equaliser before being sent-off as Club Brugge rescued a 1-1 draw against Galatasaray but ended up with nine men in a match that made certain of Real Madrid's place in the Champions League knock-out stage.
While the result ended both these two sides' hopes of progressing from Group A, Diatta's late goal leaves Brugge in the driving seat for third place and Europa League qualification heading into the final round of matches.
Fatih Terim's men came flying out of the blocks and caught Brugge out in the 11th minute, Adem Buyuk scoring with a neat piece of skill made easier by some pedestrian defending.
Thereafter the hosts were content to disrupt and frustrate the Belgian league leaders but were undone in second-half stoppage-time by Diatta's solo effort.
Both the Brugge winger and full-back Clinton Mata were shown second yellow cards for their respective roles in the goal celebrations, but it was the nevertheless the visitors who went home the happier side.
Before Brugge could settle, Omer Bayram sent a thunderous low free-kick swerving towards goal from 25 yards, forcing Simon Mignolet into a diving one-handed down to his left.
Bayram then turned provider when his cross found Buyuk with his back to goal and the striker chipped the ball up before spinning and rifling a shot into the bottom-far corner from just outside the six-yard box.
Brugge slowly worked their way back into the game and Lois Openda's smart near-post shot drew a reaction save from Fernando Muslera to keep Galatasaray 1-0 up at half-time.
Emmanuel Bonaventure Dennis found himself with time and space inside the box early in the second half but dwelled too long on the chance and ended up shooting straight at Muslera.
Brugge substitute David Okereke was presented with a gilt-edged chance to equalise 11 minutes from time, when Federico Ricca played him clean through on goal, but he side-footed his shot wide of the far post.
Just as it looked as though Galatasaray had done enough, Diatta skipped inside Yuto Nagatomo and whipped a low, left-footed shot into the far corner of the net from 20 yards, prompting wild celebrations in which he was shown a second yellow card for removing his shirt while Mata received his marching orders seemingly for kicking the corner flag.
What does it mean? Brugge in the driving seat for third place
Third place and Europa League qualification will be Brugge's if they match or better Gala's result in the final round of Group A games, though neither side can break into the top two.
Bayram the danger man
Bayram screamed for the ball before playing a pinpoint cross for Buyuk to score the opener, and Brugge were caught out numerous times by the winger's quick thinking.
Deli hit on the counter
Brugge centre-back Simon Deli seemed to get his studs caught in the turf as Buyuk scored the opener, falling backwards and allowing the Galatasaray target man an easy ride.
Brugge's final group game pits them against Madrid at home, while Galatasaray travel to Parc des Princes to face group leaders Paris Saint-Germain.