Braga - Second-half goals from Galatasaray's in-form striker Burak Yilmaz and substitute Aydin Yilmaz cancelled out Braga's opener in a memorable 2-1 comeback win that sent the Turkish Champions through to the Champions League knockout phase for the first time in a decade.
Galatasaray were second in Group H before the match, with the same points as CFR Cluj but ahead on goal difference. They needed to achieve a result that at least matched the Romanians' at Manchester United to reach the last 16.
Cluj won 1-0 at United but the Turkish side matched them by muscling out a late win on a cold evening at Braga's "quarry" stadium.
After several wasted chances Braga scored the opener through Brazilian attacking midfielder Mossoro within the half-an-hour.
But in the second half Galatasaray reacted. They equalised through Burak Yilmaz after 58 minutes before Aydin Yilmaz pounced for the late winner.
Braga started stronger and were quicker and more aggressive on the ball, dominating a surprisingly apathetic Turkish side who gave the ball away too easily.
Braga's 24-year-old striker Eder wasted a good early chance, denied by a sliding tackle from Galatasaray's Felipe Melo.
After a barrage of chances, the Portuguese deservedly went ahead. Mossoro made the most of a poor clearance effort from Melo, picked up the ball outside the box and shot home.
But Yilmaz continued his impressive form in the Champions League and extended his goal tally to six, levelling after 58 minutes with a textbook header.
With Turkish coach Fatih Terim increasingly desperate on the sidelines they completed their comeback through substitute Aydin Yilmaz when the midfielder pounced on a loose ball from a parried save by Braga keeper Quim to grab a memorable winner.